filesystem.mkdir

Create a directory at the specified path.

The following options are supported:

mode - specify the permissions to set on the new directory (0o755 is default). raise_chmod_error - choose whether to raise an exception if the attempt to set mode fails. In this case, the newly created directory will be removed to prevent use with unintended permissions.

NOTE: if chmod error is skipped, the resulting mode key in mkdir response will indicate the current permissions on the directory and not the permissions specified in the mkdir payload

Type: object

Type: array
No Additional Items

Tuple Validation

Parameter 1: filesystem_mkdir

filesystem_mkdir

Type: object
No Additional Properties

Path

Type: string

Must be at least 1 characters long

FilesystemMkdirOptions

Type: object
Default:
{ "mode": "755", "raise_chmod_error": true }

No Additional Properties

Mode

Type: string Default: "755"

Raise Chmod Error

Type: boolean Default: true

FilesystemDirEntry

Type: object
No Additional Properties

Name

Type: string

Entry's base name.

Must be at least 1 characters long

Path

Type: string

Entry's full path.

Must be at least 1 characters long

Realpath

Type: string

Canonical path of the entry, eliminating any symbolic links

Must be at least 1 characters long

Type

Type: enum (of string)
Must be one of:
  • "DIRECTORY"
  • "FILE"
  • "SYMLINK"
  • "OTHER"

Size

Type: integer

Size in bytes of a plain file. This corresonds with stx_size.

Allocation Size

Type: integer

Allocated size of file. Calculated by multiplying stx_blocks by 512.

Mode

Type: integer

Entry's mode including file type information and file permission bits. This corresponds with stx_mode.

Mount Id

Type: integer

The mount ID of the mount containing the entry. This corresponds to the number in first
field of /proc/self/mountinfo and stxmntid.

Acl

Type: boolean

Specifies 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: integer

User ID of the entry's owner. This corresponds with stx_uid.

Gid

Type: integer

Group ID of the entry's owner. This corresponds with stx_gid.

Is Mountpoint

Type: boolean

Specifies whether the entry is also the mountpoint of a filesystem.

Is Ctldir

Type: boolean

Specifies 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 Items
Each item of this array must be:
Type: enum (of string)
Must be one of:
  • "COMPRESSED"
  • "APPEND"
  • "NODUMP"
  • "IMMUTABLE"
  • "AUTOMOUNT"
  • "MOUNT_ROOT"
  • "VERIFY"
  • "DAX"

Xattrs

Type: array of string

List of xattr names of extended attributes on file.

No Additional Items
Each item of this array must be:
Type: string

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.

Type: array of enum (of string)
No Additional Items
Each item of this array must be:
Type: enum (of string)
Must be one of:
  • "READONLY"
  • "HIDDEN"
  • "SYSTEM"
  • "ARCHIVE"
  • "IMMUTABLE"
  • "NOUNLINK"
  • "APPENDONLY"
  • "NODUMP"
  • "OPAQUE"
  • "AV_QUARANTINED"
  • "AV_MODIFIED"
  • "REPARSE"
  • "OFFLINE"
  • "SPARSE"
Type: null


Required roles: FILESYSTEM_DATA_WRITE