filesystem.mkdir¶
Create a directory at the specified path.
If the requested mode cannot be applied and raise_chmod_error is set, the newly created directory is removed to prevent its use with unintended permissions.
Note
If the chmod error is skipped, the mode key in the response will indicate the current
permissions on the directory and not the permissions specified in the request payload.
No Additional Items
Tuple Validation
Parameter 1: filesystem_mkdir
filesystem_mkdir
Type: objectFilesystemMkdirArgs parameters.
No Additional PropertiesPath
Type: stringPath where the new directory should be created.
Must be at least 1 characters long
FilesystemMkdirOptions
Type: objectOptions controlling directory creation behavior.
No Additional PropertiesMode
Type: string Default: "755"Unix permissions for the new directory.
Raise Chmod Error
Type: boolean Default: trueWhether to raise an error if chmod fails.
FilesystemDirEntry
Type: objectInformation about the created directory.
No Additional PropertiesName
Type: stringEntry's base name.
Must be at least 1 characters long
Path
Type: stringEntry's full path.
Must be at least 1 characters long
Realpath
Type: stringCanonical path of the entry, eliminating any symbolic links.
Must be at least 1 characters long
Type
Type: enum (of string)Type of filesystem entry.
DIRECTORY: Directory/folderFILE: Regular fileSYMLINK: Symbolic linkOTHER: Other file types (device, pipe, socket, etc.)
Must be one of:
- "DIRECTORY"
- "FILE"
- "SYMLINK"
- "OTHER"
Size
Type: integerSize of the file in bytes. For directories, this may not represent total content size. Corresonds with stx_size.
Allocation Size
Type: integerAllocated size of file. Calculated by multiplying stx_blocks by 512.
Mode
Type: integerEntry's mode including file type information and file permission bits. This corresponds with stx_mode.
Mount Id
Type: integerThe mount ID of the mount containing the entry. This corresponds to the number in first field of /proc/self/mountinfo and stxmntid.
Acl
Type: booleanSpecifies whether ACL is present on the entry. If this is the case then file permission bits as reported in mode may not be representative of the actual permissions.
Uid
Type: integerUser ID of the entry's owner. This corresponds with stx_uid.
Gid
Type: integerGroup ID of the entry's owner. This corresponds with stx_gid.
Is Mountpoint
Type: booleanSpecifies whether the entry is also the mountpoint of a filesystem.
Is Ctldir
Type: booleanSpecifies whether the entry is located within the ZFS ctldir (for example a snapshot).
Attributes
Type: array of enum (of string)Extra file attribute indicators for entry as returned by statx. Expanded from stx_attributes.
No Additional ItemsEach item of this array must be:
Must be one of:
- "COMPRESSED"
- "APPEND"
- "NODUMP"
- "ENCRYPTED"
- "IMMUTABLE"
- "AUTOMOUNT"
- "MOUNT_ROOT"
- "VERIFY"
- "DAX"
Xattrs
Type: array of stringList of xattr names of extended attributes on file.
No Additional ItemsEach item of this array must be:
Must be at least 1 characters long
Zfs Attrs
List of extra ZFS-related file attribute indicators on file. Will be None type if filesystem is not ZFS.
No Additional Items
Each item of this array must be:
Must be one of:
- "READONLY"
- "HIDDEN"
- "SYSTEM"
- "ARCHIVE"
- "IMMUTABLE"
- "NOUNLINK"
- "APPENDONLY"
- "NODUMP"
- "OPAQUE"
- "AV_QUARANTINED"
- "AV_MODIFIED"
- "REPARSE"
- "OFFLINE"
- "SPARSE"
Required roles: FILESYSTEM_DATA_WRITE