GEOS SDK TechDocs
|
|
4.2 Current Path and Directory Stack
|
5 Files
FileCreateDir(), FileDeleteDir()
You can create directories with
FileCreateDir()
. The routine takes a single argument, namely the address of a character string. If the string is simply a directory name, it will attempt to create that directory at the current location. If the string is a relative path, it will create the directory at the end of the path, if possible. For example, passing the string "Memos\September" will cause it to check if there is a directory called "Memos" at the current location. If there is, it will create the directory "September" inside the directory "Memos". If the string is an absolute path (i.e. there is a backslash before the first directory name), it will behave the same way, but it will start with the root directory. The routine returns zero if it was successful. If it was unsuccessful, it will return one of the following error codes:
FileCreateDir()
to create the directory inside of a directory which does not exist.Note that the directory name can be any acceptable GEOS file name; that is, it may be up to 32 characters long and can contain any characters other than backslashes, colons, asterisks, or question marks. For further information about GEOS file names, see DOS Files and GEOS Files .
You can delete directories with
FileDeleteDir()
. This routine takes a single argument, namely the address of a character string. This string can specify a relative or absolute path, as with
FileCreateDir()
. It attempts to delete the directory specified. (Note that you are not allowed to delete your current directory or a non-empty directory.) If it successfully removes the directory, it returns zero. Otherwise, it returns one of the following members of the
FileError
type:
GEOS SDK TechDocs
|
|
4.2 Current Path and Directory Stack
|
5 Files