Documentation
uwt.async lib
Uwt
. Fs_types
Module
type uv_open_flag = Uwt_base.Fs_types.uv_open_flag =
| O_RDONLY
| O_WRONLY
| O_RDWR
Open for reading and writing
| O_NONBLOCK
Open in non-blocking mode, ignored on Windows
| O_CREAT
| O_EXCL
| O_TRUNC
Truncate to 0 length if existing
| O_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 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 = Uwt_base.Fs_types.file_kind =
| S_REG
| S_DIR
| S_CHR
| S_BLK
| S_LNK
| S_FIFO
| S_SOCK
| S_UNKNOWN
Everything else - possible on some platforms.
type symlink_mode = Uwt_base.Fs_types.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 stats = Uwt_base.Fs_types.stats = {
st_dev : int;
st_kind : file_kind ;
st_perm : int;
st_nlink : int;
st_uid : int;
st_gid : int;
Group ID of the file's group
st_rdev : int;
st_ino : int;
st_size : int64;
st_blksize : int;
"Preferred" block size for efficient filesystem I/O
st_blocks : int;
Number of blocks allocated to the file, in 512-byte units
st_flags : int;
User defined flags for file
st_gen : int;
st_atime : int64;
st_atime_nsec : int;
Nanosecond components of last access time
st_mtime : int64;
st_mtime_nsec : int;
Nanosecond components of last modification time
st_ctime : int64;
st_ctime_nsec : int;
Nanosecond components of lastt status change time
st_birthtime : int64;
st_birthtime_nsec : int;
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
| 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