Posix_statHigh-level API to <sys/stat.h>. See: sys/stat.h for details on data structures and functions.
val s_ifmt : Posix_types.mode_tFile type mask
val s_ifreg : Posix_types.mode_tRegular file
val s_ifdir : Posix_types.mode_tDirectory
val s_iflnk : Posix_types.mode_tSymbolic link
val s_ifchr : Posix_types.mode_tCharacter device
val s_ifblk : Posix_types.mode_tBlock device
val s_ififo : Posix_types.mode_tFIFO/pipe
val s_ifsock : Posix_types.mode_tSocket
val s_isuid : Posix_types.mode_tSet-user-ID on execution
val s_isgid : Posix_types.mode_tSet-group-ID on execution
val s_isvtx : Posix_types.mode_tSticky bit
val s_irwxu : Posix_types.mode_tOwner: read, write, execute
val s_irusr : Posix_types.mode_tOwner: read permission
val s_iwusr : Posix_types.mode_tOwner: write permission
val s_ixusr : Posix_types.mode_tOwner: execute permission
val s_irwxg : Posix_types.mode_tGroup: read, write, execute
val s_irgrp : Posix_types.mode_tGroup: read permission
val s_iwgrp : Posix_types.mode_tGroup: write permission
val s_ixgrp : Posix_types.mode_tGroup: execute permission
val s_irwxo : Posix_types.mode_tOthers: read, write, execute
val s_iroth : Posix_types.mode_tOthers: read permission
val s_iwoth : Posix_types.mode_tOthers: write permission
val s_ixoth : Posix_types.mode_tOthers: execute permission
File type test functions (equivalent to POSIX S_IS* macros). These test the st_mode field to determine file type.
val s_isreg : Posix_types.mode_t -> boolTest for regular file
val s_isdir : Posix_types.mode_t -> boolTest for directory
val s_islnk : Posix_types.mode_t -> boolTest for symbolic link
val s_ischr : Posix_types.mode_t -> boolTest for character device
val s_isblk : Posix_types.mode_t -> boolTest for block device
val s_isfifo : Posix_types.mode_t -> boolTest for FIFO/pipe
val s_issock : Posix_types.mode_t -> boolTest for socket
type stat = {st_dev : Posix_types.dev_t;Device ID of device containing file
*)st_ino : Posix_types.ino_t;File serial number
*)st_mode : Posix_types.mode_t;File mode (type and permissions)
*)st_nlink : Posix_types.nlink_t;Number of hard links
*)st_uid : Posix_types.uid_t;User ID of file owner
*)st_gid : Posix_types.gid_t;Group ID of file owner
*)st_rdev : Posix_types.dev_t;Device ID (if special file)
*)st_size : Posix_types.off_t;File size in bytes
*)st_atim : Posix_time2.Timespec.t;Time of last access
*)st_mtim : Posix_time2.Timespec.t;Time of last modification
*)st_ctim : Posix_time2.Timespec.t;Time of last status change
*)st_blksize : Posix_types.blksize_t;Optimal block size for I/O
*)st_blocks : Posix_types.blkcnt_t;Number of 512-byte blocks allocated
*)}High-level representation of struct stat. All fields are accessible as record fields. Timestamps use Posix_time2.Timespec.t.
val stat : string -> statstat path returns file status for the file at path. Follows symbolic links.
val fstat : Unix.file_descr -> statfstat fd returns file status for the open file descriptor fd.
val lstat : string -> statlstat path returns file status for the file at path. Does not follow symbolic links (returns info about the link itself).
val chmod : string -> Posix_types.mode_t -> unitchmod path mode changes the file mode (permissions) of path.
val fchmod : Unix.file_descr -> Posix_types.mode_t -> unitfchmod fd mode changes the file mode of the open file descriptor fd.
val mkdir : string -> Posix_types.mode_t -> unitmkdir path mode creates a new directory at path with permissions mode.
val mkfifo : string -> Posix_types.mode_t -> unitmkfifo path mode creates a FIFO special file at path with permissions mode.
val umask : Posix_types.mode_t -> Posix_types.mode_tumask mask sets the file mode creation mask and returns the previous value. The mask determines which permission bits are turned off when creating new files.
val fstatat : ?dirfd:Unix.file_descr -> ?flags:int list -> string -> statfstatat ?dirfd ?flags path is like stat but interprets path relative to directory dirfd. If dirfd is omitted, uses current working directory. flags may include at_symlink_nofollow.
val fchmodat :
?dirfd:Unix.file_descr ->
?flags:int list ->
string ->
Posix_types.mode_t ->
unitfchmodat ?dirfd ?flags path mode is like chmod but interprets path relative to directory dirfd.
val mkdirat : ?dirfd:Unix.file_descr -> string -> Posix_types.mode_t -> unitmkdirat ?dirfd path mode is like mkdir but interprets path relative to directory dirfd.
val mkfifoat : ?dirfd:Unix.file_descr -> string -> Posix_types.mode_t -> unitmkfifoat ?dirfd path mode is like mkfifo but interprets path relative to directory dirfd.