Home > Language Reference > Classes > VFSVolume

CreateDirectory Method

Creates a directory.

Syntax

Public Sub CreateDirectory(ByRef sName As String)

ParameterDescription
sName Directory name to create.

Remarks

The CreateDirectory method creates a directory on a memory card. Like most functionality of this object, calling this method without having previously initialized a valid volume reference in the Reference property will cause a runtime error.

The sName parameter specifies the name of the directory to be created and should be a full path name, the root folder being designated by "/". If the directory already exists, a runtime error occurs.

The following example shoes how to create the "/Tmp" folder in the first volume found:

Private Sub Button1_Click()
  Dim v as New VFSVolume

  If v.FindFirstVolume Then
    v.CreateDirectory "/Tmp"
  Else
    MsgBox "No card inserted"
  End If
End Sub

See also Expansion cards and the VFSDemo sample.

System requirements

SystemMinimal versionRemarks
Palm OSPalm OS 3.0Requires an expansion slot.