module Fs_types:sig
..end
type
uv_open_flag =
| |
O_RDONLY |
(* | Open for reading | *) |
| |
O_WRONLY |
(* | Open for writing | *) |
| |
O_RDWR |
(* | Open for reading and writing | *) |
| |
O_NONBLOCK |
(* | Open in non-blocking mode, ignored on Windows | *) |
| |
O_CREAT |
(* | Create if nonexistent | *) |
| |
O_EXCL |
(* | Fail if existing | *) |
| |
O_TRUNC |
(* | Truncate to 0 length if existing | *) |
| |
O_APPEND |
(* | Open for append | *) |
| |
O_NOCTTY |
(* | Don't make this dev a controlling tty, ignored on Windows | *) |
| |
O_DSYNC |
(* | Writes complete as `Synchronised I/O data integrity completion', ignored by some platforms | *) |
| |
O_SYNC |
(* | Writes complete as `Synchronised I/O file integrity completion', ignored by some platforms | *) |
| |
O_RSYNC |
(* | Reads complete as writes (depending on O_SYNC/O_DSYNC), only supported on some Unix platforms, ignored otherwise | *) |
| |
O_TEMPORARY |
(* | windows only, ignored on Unix | *) |
| |
O_SHORT_LIVED |
(* | windows only, ignored on Unix | *) |
| |
O_SEQUENTIAL |
(* | windows only, ignored on Unix | *) |
| |
O_RANDOM |
(* | windows only, ignored on Unix | *) |
| |
O_DIRECT |
(* | On Windows supported since libuv 1.16 | *) |
| |
O_EXLOCK |
(* | OS X (and Windows, but with different semantic) | *) |
| |
O_NOATIME |
(* | no windows, some Unix systems, ignored otherwise | *) |
| |
O_SYMLINK |
(* | no windows, some Unix systems, ignored otherwise | *) |
| |
O_NOFOLLOW |
(* | no windows, some Unix systems, ignored otherwise | *) |
| |
O_DIRECTORY |
(* | no windows, some Unix systems, ignored otherwise | *) |
Flags for Uwt_base.Fs_functions.openfile
O_CLOEXEC
doesn't exist, because this flag is unconditionally
added by libuv. O_SHARE_DELETE
, O_SHARE_WRITE
, O_SHARE_READ
are always added on Windows, unless O_EXLOCK
is specified.
type
file_kind =
| |
S_REG |
(* | Regular file | *) |
| |
S_DIR |
(* | Directory | *) |
| |
S_CHR |
(* | Character device | *) |
| |
S_BLK |
(* | Block device | *) |
| |
S_LNK |
(* | Symbolic link | *) |
| |
S_FIFO |
(* | Named pipe | *) |
| |
S_SOCK |
(* | Socket | *) |
| |
S_UNKNOWN |
(* | Everything else - possible on some platforms. | *) |
type
symlink_mode =
| |
S_Default |
|||
| |
S_Dir |
(* | indicates that path points to a directory. | *) |
| |
S_Junction |
(* | request that the symlink is created using junction points. | *) |
On Windows it can be specified how to create symlinks.
type
access_permission =
| |
Read |
(* | Read permission | *) |
| |
Write |
(* | Write permission | *) |
| |
Exec |
(* | Execution permission | *) |
| |
Exists |
(* | File exists | *) |
type
stats = {
|
st_dev : |
(* | Device number | *) |
|
st_kind : |
(* | Kind of the file | *) |
|
st_perm : |
(* | Access rights | *) |
|
st_nlink : |
(* | Number of links | *) |
|
st_uid : |
(* | User id of the owner | *) |
|
st_gid : |
(* | Group ID of the file's group | *) |
|
st_rdev : |
(* | Device minor number | *) |
|
st_ino : |
(* | Inode number | *) |
|
st_size : |
(* | Size in bytes | *) |
|
st_blksize : |
(* | "Preferred" block size for efficient filesystem I/O | *) |
|
st_blocks : |
(* | Number of blocks allocated to the file, in 512-byte units | *) |
|
st_flags : |
(* | User defined flags for file | *) |
|
st_gen : |
(* | File generation number | *) |
|
st_atime : |
(* | Last access time | *) |
|
st_atime_nsec : |
(* | Nanosecond components of last access time | *) |
|
st_mtime : |
(* | Last modification time | *) |
|
st_mtime_nsec : |
(* | Nanosecond components of last modification time | *) |
|
st_ctime : |
(* | Last status change time | *) |
|
st_ctime_nsec : |
(* | Nanosecond components of lastt status change time | *) |
|
st_birthtime : |
(* | File creation time | *) |
|
st_birthtime_nsec : |
(* | Nanosecond components of File creation time | *) |
File status information. Support for the various fields differs depending on the OS and filesystem.
type
clone_mode =
| |
No_clone |
(* | Create a normal copy | *) |
| |
Try_clone |
(* | Try to clone the file, but create a normal copy, if it fails | *) |
| |
Force_clone |
(* | Try tlone the file, don't create a normal copy, if it fails | *) |
Clone mode for Uwt_base.Fs_functions.copyfile