createDirectory

createDirectory dir creates a new directory dir which is initially empty, or as near to empty as the operating system allows. The operation may fail with:
  • isPermissionError The process has insufficient privileges to perform the operation. [EROFS, EACCES]
  • isAlreadyExistsError The operand refers to a directory that already exists. [EEXIST]
  • HardwareFault A physical I/O error has occurred. [EIO]
  • InvalidArgument The operand is not a valid directory name. [ENAMETOOLONG, ELOOP]
  • isDoesNotExistError There is no path to the directory. [ENOENT, ENOTDIR]
  • isFullError Insufficient resources (virtual memory, process file descriptors, physical disk space, etc.) are available to perform the operation. [EDQUOT, ENOSPC, ENOMEM, EMLINK]
  • InappropriateType The path refers to an existing non-directory object. [EEXIST]
createDirectory dir creates a new directory dir which is initially empty, or as near to empty as the operating system allows. The operation may fail with:
  • isPermissionError The process has insufficient privileges to perform the operation. [EROFS, EACCES]
  • isAlreadyExistsError The operand refers to a directory that already exists. [EEXIST]
  • HardwareFault A physical I/O error has occurred. [EIO]
  • InvalidArgument The operand is not a valid directory name. [ENAMETOOLONG, ELOOP]
  • isDoesNotExistError There is no path to the directory. [ENOENT, ENOTDIR]
  • isFullError Insufficient resources (virtual memory, process file descriptors, physical disk space, etc.) are available to perform the operation. [EDQUOT, ENOSPC, ENOMEM, EMLINK]
  • InappropriateType The path refers to an existing non-directory object. [EEXIST]
createDirectoryIfMissing parents dir creates a new directory dir if it doesn't exist. If the first argument is True the function will also create all parent directories if they are missing.
Create a directory symbolic link. The target path can be either absolute or relative and need not refer to an existing directory. The order of arguments follows the POSIX convention. To remove an existing directory symbolic link, use removeDirectoryLink. Although the distinction between file symbolic links and directory symbolic links does not exist on POSIX systems, on Windows this is an intrinsic property of every symbolic link and cannot be changed without recreating the link. A file symbolic link that actually points to a directory will fail to dereference and vice versa. Moreover, creating symbolic links on Windows may require privileges unavailable to users outside the Administrators group. Portable programs that use symbolic links should take both into consideration. On Windows, the function is implemented using CreateSymbolicLink with SYMBOLIC_LINK_FLAG_DIRECTORY. Since 1.3.3.0, the SYMBOLIC_LINK_FLAG_ALLOW_UNPRIVILEGED_CREATE flag is also included if supported by the operating system. On POSIX, this is an alias for createFileLink and is therefore atomic. Windows-specific errors: This operation may fail with permissionErrorType if the user lacks the privileges to create symbolic links. It may also fail with illegalOperationErrorType if the file system does not support symbolic links.
createDirectoryIfMissing parents dir creates a new directory dir if it doesn't exist. If the first argument is True the function will also create all parent directories if they are missing.
Create a directory symbolic link. The target path can be either absolute or relative and need not refer to an existing directory. The order of arguments follows the POSIX convention. To remove an existing directory symbolic link, use removeDirectoryLink. Although the distinction between file symbolic links and directory symbolic links does not exist on POSIX systems, on Windows this is an intrinsic property of every symbolic link and cannot be changed without recreating the link. A file symbolic link that actually points to a directory will fail to dereference and vice versa. Moreover, creating symbolic links on Windows may require privileges unavailable to users outside the Administrators group. Portable programs that use symbolic links should take both into consideration. On Windows, the function is implemented using CreateSymbolicLink with SYMBOLIC_LINK_FLAG_DIRECTORY. Since 1.3.3.0, the SYMBOLIC_LINK_FLAG_ALLOW_UNPRIVILEGED_CREATE flag is also included if supported by the operating system. On POSIX, this is an alias for createFileLink and is therefore atomic. Windows-specific errors: This operation may fail with permissionErrorType if the user lacks the privileges to create symbolic links. It may also fail with illegalOperationErrorType if the file system does not support symbolic links.
Same as createDirectoryIfMissing but logs at higher verbosity levels.