Up: GEOS SDK TechDocs | Up | Prev: FileCreate() ... | Next: FileEnum() ...

FileDeleteDir()

word	FileDeleteDir( /* Returns error & sets thread's error value */
        const char * name);			/* Relative path of directory to delete */

This argument deletes an existing directory. The parameter is a string which specifies the directory's position relative to the current working directory. The last element of the path string must be the name of the directory to delete.

If FileDeleteDir() is successful, it returns zero and clears the thread's error value. Otherwise, it returns an error code and sets the thread's error value (accessible via ThreadGetError() ). The following errors are returned:

ERROR_PATH_NOT_FOUND
The directory specified could not be found or does not exist.
ERROR_IS_CURRENT_DIRECTORY
This directory is some thread's current directory, or else it is on some thread's directory stack.
ERROR_ACCESS_DENIED
The thread does not have permission to delete the directory.
ERROR_WRITE_PROTECTED
The volume is write-protected.
ERROR_DIRECTORY_NOT_EMPTY
The directory specified is not empty. A directory must be empty before it can be deleted.

See Also: FileCreateDir().

Include: file.h

FileDuplicateHandle()

FileHandle FileDuplicateHandle( /* Sets thread's error value */
        FileHandle fh);

This routine duplicates the handle of an open file and returns the duplicate handle. The duplicate handle has the same read/write position as the original. Both handles will have to be closed for the file to be closed. If there is an error, FileDuplicateHandle() returns a null handle and sets the thread's error value (accessible via ThreadGetError() ).

Include: file.h


Up: GEOS SDK TechDocs | Up | Prev: FileCreate() ... | Next: FileEnum() ...