Deleting a directoryΒΆ

rmdir()

Delete a directory


SYNTAX

rmdir(pathname)

The rmdir() function deletes the directory specified in pathname, which may be a string constant or a string expression. The directory must be empty.

The function returns 0 if successful, otherwise it returns -1 and assigns the operating system error code to sys.Errno.


NOTES


EXAMPLE

if (rmdir(TempIndexDirPath) <> 0) {
     error "Unable to delete temporary directory " + TempIndexDirPath / ""
}

RELATED TOPICS

File and directory handling functions