Copyright | (c) Winterland 2017-2018 |
---|---|
License | BSD |
Maintainer | drkoster@qq.com |
Stability | experimental |
Portability | non-portable |
Safe Haskell | None |
Language | Haskell2010 |
INTERNAL MODULE, provides all libuv side operations.
Synopsis
- uv_version :: IO CUInt
- uv_version_string :: IO CString
- type UVSlot = Int
- newtype UVSlotUnSafe = UVSlotUnSafe {}
- type UVFD = Int32
- pattern ACCEPT_BUFFER_SIZE :: Int
- pattern SO_REUSEPORT_LOAD_BALANCE :: Int
- pattern INIT_LOOP_SIZE :: Int
- data UVLoop
- data UVLoopData
- peekUVEventQueue :: Ptr UVLoopData -> IO (Int, Ptr Int)
- clearUVEventCounter :: Ptr UVLoopData -> IO ()
- peekUVBufferTable :: Ptr UVLoopData -> IO (Ptr (Ptr Word8), Ptr CSsize)
- newtype UVRunMode = UVRunMode CInt
- pattern UV_RUN_DEFAULT :: UVRunMode
- pattern UV_RUN_ONCE :: UVRunMode
- pattern UV_RUN_NOWAIT :: UVRunMode
- peekUVLoopData :: Ptr UVLoop -> IO (Ptr UVLoopData)
- hs_uv_loop_init :: Int -> IO (Ptr UVLoop)
- hs_uv_loop_close :: Ptr UVLoop -> IO ()
- uv_run :: Ptr UVLoop -> UVRunMode -> IO CInt
- uv_run_safe :: Ptr UVLoop -> UVRunMode -> IO CInt
- uv_loop_alive :: Ptr UVLoop -> IO CInt
- hs_uv_wake_up_timer :: Ptr UVLoopData -> IO CInt
- hs_uv_wake_up_async :: Ptr UVLoopData -> IO CInt
- data UVHandle
- peekUVHandleData :: Ptr UVHandle -> IO UVSlotUnSafe
- hs_uv_fileno :: Ptr UVHandle -> IO UVFD
- hs_uv_handle_alloc :: Ptr UVLoop -> IO (Ptr UVHandle)
- hs_uv_handle_free :: Ptr UVHandle -> IO ()
- hs_uv_handle_close :: Ptr UVHandle -> IO ()
- hs_uv_cancel :: Ptr UVLoop -> UVSlot -> IO ()
- hs_uv_listen :: Ptr UVHandle -> CInt -> IO CInt
- hs_uv_listen_resume :: Ptr UVHandle -> IO ()
- hs_uv_read_start :: Ptr UVHandle -> IO CInt
- uv_read_stop :: Ptr UVHandle -> IO CInt
- hs_uv_write :: Ptr UVHandle -> Ptr Word8 -> Int -> IO UVSlotUnSafe
- hs_uv_accept_check_alloc :: Ptr UVHandle -> IO (Ptr UVHandle)
- hs_uv_accept_check_init :: Ptr UVHandle -> IO CInt
- hs_uv_accept_check_close :: Ptr UVHandle -> IO ()
- hs_uv_tcp_open :: Ptr UVHandle -> UVFD -> IO CInt
- uv_tcp_init :: Ptr UVLoop -> Ptr UVHandle -> IO CInt
- uv_tcp_init_ex :: Ptr UVLoop -> Ptr UVHandle -> CUInt -> IO CInt
- uv_tcp_nodelay :: Ptr UVHandle -> CInt -> IO CInt
- uv_tcp_keepalive :: Ptr UVHandle -> CInt -> CUInt -> IO CInt
- uV_TCP_IPV6ONLY :: CUInt
- uv_tcp_bind :: Ptr UVHandle -> Ptr SocketAddr -> CUInt -> IO CInt
- hs_uv_tcp_connect :: Ptr UVHandle -> Ptr SocketAddr -> IO UVSlotUnSafe
- hs_set_socket_reuse :: Ptr UVHandle -> IO CInt
- hs_uv_pipe_open :: Ptr UVHandle -> UVFD -> IO CInt
- uv_pipe_init :: Ptr UVLoop -> Ptr UVHandle -> CInt -> IO CInt
- uv_pipe_bind :: Ptr UVHandle -> CString -> IO CInt
- hs_uv_pipe_connect :: Ptr UVHandle -> CString -> IO UVSlotUnSafe
- uv_udp_init :: Ptr UVLoop -> Ptr UVHandle -> IO CInt
- uv_udp_init_ex :: Ptr UVLoop -> Ptr UVHandle -> CUInt -> IO CInt
- uv_udp_open :: Ptr UVHandle -> UVFD -> IO CInt
- uv_udp_bind :: Ptr UVHandle -> Ptr SocketAddr -> UVUDPFlag -> IO CInt
- newtype UVMembership = UVMembership CInt
- pattern UV_LEAVE_GROUP :: UVMembership
- pattern UV_JOIN_GROUP :: UVMembership
- newtype UVUDPFlag = UVUDPFlag CInt
- pattern UV_UDP_DEFAULT :: UVUDPFlag
- pattern UV_UDP_IPV6ONLY :: UVUDPFlag
- pattern UV_UDP_REUSEADDR :: UVUDPFlag
- pattern UV_UDP_PARTIAL :: Int32
- uv_udp_connect :: Ptr UVHandle -> Ptr SocketAddr -> IO CInt
- uv_udp_set_membership :: Ptr UVHandle -> CString -> CString -> UVMembership -> IO CInt
- uv_udp_set_source_membership :: Ptr UVHandle -> CString -> CString -> CString -> UVMembership -> IO CInt
- uv_udp_set_multicast_loop :: Ptr UVHandle -> CInt -> IO CInt
- uv_udp_set_multicast_ttl :: Ptr UVHandle -> CInt -> IO CInt
- uv_udp_set_multicast_interface :: Ptr UVHandle -> CString -> IO CInt
- uv_udp_set_broadcast :: Ptr UVHandle -> CInt -> IO CInt
- uv_udp_set_ttl :: Ptr UVHandle -> CInt -> IO CInt
- hs_uv_udp_recv_start :: Ptr UVHandle -> IO CInt
- uv_udp_recv_stop :: Ptr UVHandle -> IO CInt
- hs_uv_udp_send :: Ptr UVHandle -> Ptr SocketAddr -> Ptr Word8 -> Int -> IO UVSlotUnSafe
- uv_udp_getsockname :: Ptr UVHandle -> Ptr SocketAddr -> MBA# CInt -> IO CInt
- uv_udp_getpeername :: Ptr UVHandle -> Ptr SocketAddr -> MBA# CInt -> IO CInt
- newtype UVTTYMode = UVTTYMode CInt
- pattern UV_TTY_MODE_NORMAL :: UVTTYMode
- pattern UV_TTY_MODE_RAW :: UVTTYMode
- pattern UV_TTY_MODE_IO :: UVTTYMode
- uv_tty_init :: Ptr UVLoop -> Ptr UVHandle -> CInt -> IO CInt
- uv_tty_set_mode :: Ptr UVHandle -> UVTTYMode -> IO CInt
- uv_tty_get_winsize :: Ptr UVHandle -> MBA# CInt -> MBA# CInt -> IO CInt
- newtype FileMode = FileMode CInt
- pattern S_IRWXU :: FileMode
- pattern S_IRUSR :: FileMode
- pattern S_IWUSR :: FileMode
- pattern S_IXUSR :: FileMode
- pattern S_IRWXG :: FileMode
- pattern S_IRGRP :: FileMode
- pattern S_IWGRP :: FileMode
- pattern S_IXGRP :: FileMode
- pattern S_IRWXO :: FileMode
- pattern S_IROTH :: FileMode
- pattern S_IWOTH :: FileMode
- pattern S_IXOTH :: FileMode
- pattern DEFAULT_MODE :: FileMode
- hs_uv_fs_open :: CString -> FileFlag -> FileMode -> IO UVFD
- hs_uv_fs_close :: UVFD -> IO Int
- hs_uv_fs_read :: UVFD -> Ptr Word8 -> Int -> Int64 -> IO Int
- hs_uv_fs_write :: UVFD -> Ptr Word8 -> Int -> Int64 -> IO Int
- hs_uv_fs_unlink :: CString -> IO Int
- hs_uv_fs_mkdir :: CString -> FileMode -> IO Int
- hs_uv_fs_rmdir :: CString -> IO Int
- hs_uv_fs_mkdtemp :: CString -> Int -> CString -> IO Int
- hs_uv_fs_open_threaded :: CString -> FileFlag -> FileMode -> Ptr UVLoop -> IO UVSlotUnSafe
- hs_uv_fs_close_threaded :: UVFD -> Ptr UVLoop -> IO UVSlotUnSafe
- hs_uv_fs_read_threaded :: UVFD -> Ptr Word8 -> Int -> Int64 -> Ptr UVLoop -> IO UVSlotUnSafe
- hs_uv_fs_write_threaded :: UVFD -> Ptr Word8 -> Int -> Int64 -> Ptr UVLoop -> IO UVSlotUnSafe
- hs_uv_fs_unlink_threaded :: CString -> Ptr UVLoop -> IO UVSlotUnSafe
- hs_uv_fs_mkdir_threaded :: CString -> FileMode -> Ptr UVLoop -> IO UVSlotUnSafe
- hs_uv_fs_rmdir_threaded :: CString -> Ptr UVLoop -> IO UVSlotUnSafe
- hs_uv_fs_mkdtemp_threaded :: CString -> Int -> CString -> Ptr UVLoop -> IO UVSlotUnSafe
- newtype FileFlag = FileFlag CInt
- pattern O_APPEND :: FileFlag
- pattern O_CREAT :: FileFlag
- pattern O_DIRECT :: FileFlag
- pattern O_DIRECTORY :: FileFlag
- pattern O_DSYNC :: FileFlag
- pattern O_EXCL :: FileFlag
- pattern O_EXLOCK :: FileFlag
- pattern O_NOATIME :: FileFlag
- pattern O_NOCTTY :: FileFlag
- pattern O_NOFOLLOW :: FileFlag
- pattern O_NONBLOCK :: FileFlag
- pattern O_RANDOM :: FileFlag
- pattern O_RDONLY :: FileFlag
- pattern O_RDWR :: FileFlag
- pattern O_SEQUENTIAL :: FileFlag
- pattern O_SHORT_LIVED :: FileFlag
- pattern O_SYMLINK :: FileFlag
- pattern O_SYNC :: FileFlag
- pattern O_TEMPORARY :: FileFlag
- pattern O_TRUNC :: FileFlag
- pattern O_WRONLY :: FileFlag
- newtype UVDirEntType = UVDirEntType CChar
- data DirEntType
- fromUVDirEntType :: UVDirEntType -> DirEntType
- uV__DT_FILE :: UVDirEntType
- uV__DT_DIR :: UVDirEntType
- uV__DT_LINK :: UVDirEntType
- uV__DT_FIFO :: UVDirEntType
- uV__DT_SOCKET :: UVDirEntType
- data UVDirEnt
- uV__DT_CHAR :: UVDirEntType
- peekUVDirEnt :: Ptr UVDirEnt -> IO (CString, UVDirEntType)
- uV__DT_BLOCK :: UVDirEntType
- hs_uv_fs_scandir_cleanup :: Ptr (Ptr UVDirEnt) -> Int -> IO ()
- hs_uv_fs_scandir :: CString -> MBA# (Ptr UVDirEnt) -> IO Int
- hs_uv_fs_scandir_extra_cleanup :: Ptr (Ptr (Ptr UVDirEnt)) -> Int -> IO ()
- hs_uv_fs_scandir_threaded :: CString -> Ptr (Ptr (Ptr UVDirEnt)) -> Ptr UVLoop -> IO UVSlotUnSafe
- data UVTimeSpec = UVTimeSpec {
- uvtSecond :: !CLong
- uvtNanoSecond :: !CLong
- data UVStat = UVStat {}
- uvStatSize :: Int
- peekUVStat :: Ptr UVStat -> IO UVStat
- hs_uv_fs_stat :: CString -> Ptr UVStat -> IO Int
- hs_uv_fs_fstat :: UVFD -> Ptr UVStat -> IO Int
- hs_uv_fs_lstat :: CString -> Ptr UVStat -> IO Int
- hs_uv_fs_rename :: CString -> CString -> IO Int
- hs_uv_fs_fsync :: UVFD -> IO Int
- hs_uv_fs_fdatasync :: UVFD -> IO Int
- hs_uv_fs_ftruncate :: UVFD -> Int64 -> IO Int
- hs_uv_fs_stat_threaded :: CString -> Ptr UVStat -> Ptr UVLoop -> IO UVSlotUnSafe
- hs_uv_fs_fstat_threaded :: UVFD -> Ptr UVStat -> Ptr UVLoop -> IO UVSlotUnSafe
- hs_uv_fs_lstat_threaded :: CString -> Ptr UVStat -> Ptr UVLoop -> IO UVSlotUnSafe
- hs_uv_fs_rename_threaded :: CString -> CString -> Ptr UVLoop -> IO UVSlotUnSafe
- hs_uv_fs_fsync_threaded :: UVFD -> Ptr UVLoop -> IO UVSlotUnSafe
- hs_uv_fs_fdatasync_threaded :: UVFD -> Ptr UVLoop -> IO UVSlotUnSafe
- hs_uv_fs_ftruncate_threaded :: UVFD -> Int64 -> Ptr UVLoop -> IO UVSlotUnSafe
- newtype UVCopyFileFlag = UVCopyFileFlag CInt
- pattern COPYFILE_DEFAULT :: UVCopyFileFlag
- pattern COPYFILE_EXCL :: UVCopyFileFlag
- pattern COPYFILE_FICLONE :: UVCopyFileFlag
- hs_uv_fs_copyfile :: CString -> CString -> UVCopyFileFlag -> IO Int
- hs_uv_fs_copyfile_threaded :: CString -> CString -> UVCopyFileFlag -> Ptr UVLoop -> IO UVSlotUnSafe
- newtype UVAccessMode = UVAccessMode CInt
- pattern F_OK :: UVAccessMode
- pattern R_OK :: UVAccessMode
- pattern W_OK :: UVAccessMode
- pattern X_OK :: UVAccessMode
- data AccessResult
- hs_uv_fs_access :: CString -> UVAccessMode -> IO Int
- hs_uv_fs_access_threaded :: CString -> UVAccessMode -> Ptr UVLoop -> IO UVSlotUnSafe
- hs_uv_fs_chmod :: CString -> FileMode -> IO Int
- hs_uv_fs_chmod_threaded :: CString -> FileMode -> Ptr UVLoop -> IO UVSlotUnSafe
- hs_uv_fs_fchmod :: UVFD -> FileMode -> IO Int
- hs_uv_fs_fchmod_threaded :: UVFD -> FileMode -> Ptr UVLoop -> IO UVSlotUnSafe
- hs_uv_fs_utime :: CString -> Double -> Double -> IO Int
- hs_uv_fs_utime_threaded :: CString -> Double -> Double -> Ptr UVLoop -> IO UVSlotUnSafe
- hs_uv_fs_futime :: UVFD -> Double -> Double -> IO Int
- hs_uv_fs_futime_threaded :: UVFD -> Double -> Double -> Ptr UVLoop -> IO UVSlotUnSafe
- newtype UVSymlinkFlag = UVSymlinkFlag CInt
- pattern SYMLINK_DEFAULT :: UVSymlinkFlag
- pattern SYMLINK_DIR :: UVSymlinkFlag
- pattern SYMLINK_JUNCTION :: UVSymlinkFlag
- hs_uv_fs_link :: CString -> CString -> IO Int
- hs_uv_fs_link_threaded :: CString -> CString -> Ptr UVLoop -> IO UVSlotUnSafe
- hs_uv_fs_symlink :: CString -> CString -> UVSymlinkFlag -> IO Int
- hs_uv_fs_symlink_threaded :: CString -> CString -> UVSymlinkFlag -> Ptr UVLoop -> IO UVSlotUnSafe
- hs_uv_fs_readlink_cleanup :: CString -> IO ()
- hs_uv_fs_readlink :: CString -> MBA# CString -> IO Int
- hs_uv_fs_realpath :: CString -> MBA# CString -> IO Int
- hs_uv_fs_readlink_extra_cleanup :: Ptr CString -> IO ()
- hs_uv_fs_readlink_threaded :: CString -> Ptr CString -> Ptr UVLoop -> IO UVSlotUnSafe
- hs_uv_fs_realpath_threaded :: CString -> Ptr CString -> Ptr UVLoop -> IO UVSlotUnSafe
- newtype UVHandleType = UVHandleType CInt
- pattern UV_UNKNOWN_HANDLE :: UVHandleType
- pattern UV_ASYNC :: UVHandleType
- pattern UV_CHECK :: UVHandleType
- pattern UV_FS_EVENT :: UVHandleType
- pattern UV_FS_POLL :: UVHandleType
- pattern UV_HANDLE :: UVHandleType
- pattern UV_IDLE :: UVHandleType
- pattern UV_NAMED_PIPE :: UVHandleType
- pattern UV_POLL :: UVHandleType
- pattern UV_PREPARE :: UVHandleType
- pattern UV_PROCESS :: UVHandleType
- pattern UV_STREAM :: UVHandleType
- pattern UV_TCP :: UVHandleType
- pattern UV_TIMER :: UVHandleType
- pattern UV_TTY :: UVHandleType
- pattern UV_UDP :: UVHandleType
- pattern UV_SIGNAL :: UVHandleType
- pattern UV_FILE :: UVHandleType
- uv_guess_handle :: UVFD -> IO UVHandleType
Documentation
uv_version :: IO CUInt Source #
newtype UVSlotUnSafe Source #
UVSlotUnSafe wrap a slot which may not have a MVar
in blocking table,
i.e. the blocking table need to be resized.
pattern ACCEPT_BUFFER_SIZE :: Int Source #
pattern SO_REUSEPORT_LOAD_BALANCE :: Int Source #
pattern INIT_LOOP_SIZE :: Int Source #
data UVLoopData Source #
peekUVEventQueue :: Ptr UVLoopData -> IO (Int, Ptr Int) Source #
clearUVEventCounter :: Ptr UVLoopData -> IO () Source #
Instances
pattern UV_RUN_DEFAULT :: UVRunMode Source #
pattern UV_RUN_ONCE :: UVRunMode Source #
pattern UV_RUN_NOWAIT :: UVRunMode Source #
peekUVLoopData :: Ptr UVLoop -> IO (Ptr UVLoopData) Source #
Peek loop data pointer from uv loop pointer.
hs_uv_wake_up_timer :: Ptr UVLoopData -> IO CInt Source #
hs_uv_wake_up_async :: Ptr UVLoopData -> IO CInt Source #
peekUVHandleData :: Ptr UVHandle -> IO UVSlotUnSafe Source #
hs_uv_write :: Ptr UVHandle -> Ptr Word8 -> Int -> IO UVSlotUnSafe Source #
uv_tcp_bind :: Ptr UVHandle -> Ptr SocketAddr -> CUInt -> IO CInt Source #
hs_uv_tcp_connect :: Ptr UVHandle -> Ptr SocketAddr -> IO UVSlotUnSafe Source #
hs_uv_pipe_connect :: Ptr UVHandle -> CString -> IO UVSlotUnSafe Source #
uv_udp_bind :: Ptr UVHandle -> Ptr SocketAddr -> UVUDPFlag -> IO CInt Source #
newtype UVMembership Source #
Instances
Eq UVMembership Source # | |
Defined in Z.IO.UV.FFI (==) :: UVMembership -> UVMembership -> Bool # (/=) :: UVMembership -> UVMembership -> Bool # | |
Ord UVMembership Source # | |
Defined in Z.IO.UV.FFI compare :: UVMembership -> UVMembership -> Ordering # (<) :: UVMembership -> UVMembership -> Bool # (<=) :: UVMembership -> UVMembership -> Bool # (>) :: UVMembership -> UVMembership -> Bool # (>=) :: UVMembership -> UVMembership -> Bool # max :: UVMembership -> UVMembership -> UVMembership # min :: UVMembership -> UVMembership -> UVMembership # | |
Show UVMembership Source # | |
Defined in Z.IO.UV.FFI showsPrec :: Int -> UVMembership -> ShowS # show :: UVMembership -> String # showList :: [UVMembership] -> ShowS # |
pattern UV_LEAVE_GROUP :: UVMembership Source #
pattern UV_JOIN_GROUP :: UVMembership Source #
Instances
pattern UV_UDP_DEFAULT :: UVUDPFlag Source #
pattern UV_UDP_IPV6ONLY :: UVUDPFlag Source #
pattern UV_UDP_REUSEADDR :: UVUDPFlag Source #
pattern UV_UDP_PARTIAL :: Int32 Source #
uv_udp_connect :: Ptr UVHandle -> Ptr SocketAddr -> IO CInt Source #
uv_udp_set_membership :: Ptr UVHandle -> CString -> CString -> UVMembership -> IO CInt Source #
uv_udp_set_source_membership :: Ptr UVHandle -> CString -> CString -> CString -> UVMembership -> IO CInt Source #
hs_uv_udp_send :: Ptr UVHandle -> Ptr SocketAddr -> Ptr Word8 -> Int -> IO UVSlotUnSafe Source #
uv_udp_getsockname :: Ptr UVHandle -> Ptr SocketAddr -> MBA# CInt -> IO CInt Source #
uv_udp_getpeername :: Ptr UVHandle -> Ptr SocketAddr -> MBA# CInt -> IO CInt Source #
Terminal mode.
When in UV_TTY_MODE_RAW
mode, input is always available character-by-character,
not including modifiers. Additionally, all special processing of characters by the terminal is disabled,
including echoing input characters. Note that CTRL+C will no longer cause a SIGINT when in this mode.
Instances
pattern UV_TTY_MODE_NORMAL :: UVTTYMode Source #
pattern UV_TTY_MODE_RAW :: UVTTYMode Source #
pattern UV_TTY_MODE_IO :: UVTTYMode Source #
Instances
pattern DEFAULT_MODE :: FileMode Source #
Default mode for open, 0o666(readable and writable).
hs_uv_fs_open_threaded :: CString -> FileFlag -> FileMode -> Ptr UVLoop -> IO UVSlotUnSafe Source #
hs_uv_fs_close_threaded :: UVFD -> Ptr UVLoop -> IO UVSlotUnSafe Source #
hs_uv_fs_read_threaded :: UVFD -> Ptr Word8 -> Int -> Int64 -> Ptr UVLoop -> IO UVSlotUnSafe Source #
hs_uv_fs_write_threaded :: UVFD -> Ptr Word8 -> Int -> Int64 -> Ptr UVLoop -> IO UVSlotUnSafe Source #
hs_uv_fs_unlink_threaded :: CString -> Ptr UVLoop -> IO UVSlotUnSafe Source #
hs_uv_fs_mkdir_threaded :: CString -> FileMode -> Ptr UVLoop -> IO UVSlotUnSafe Source #
hs_uv_fs_rmdir_threaded :: CString -> Ptr UVLoop -> IO UVSlotUnSafe Source #
hs_uv_fs_mkdtemp_threaded :: CString -> Int -> CString -> Ptr UVLoop -> IO UVSlotUnSafe Source #
Instances
pattern O_APPEND :: FileFlag Source #
The file is opened in append mode. Before each write, the file offset is positioned at the end of the file.
pattern O_DIRECT :: FileFlag Source #
File IO is done directly to and from user-space buffers, which must be aligned. Buffer size and address should be a multiple of the physical sector size of the block device, (DO NOT USE WITH Z-IO's BufferedIO
)
pattern O_DIRECTORY :: FileFlag Source #
If the path is not a directory, fail the open. (Not useful on regular file)
Note o_DIRECTORY
is not supported on Windows.
pattern O_DSYNC :: FileFlag Source #
The file is opened for synchronous IO. Write operations will complete once all data and a minimum of metadata are flushed to disk.
Note o_DSYNC
is supported on Windows via FILE_FLAG_WRITE_THROUGH
.
pattern O_EXCL :: FileFlag Source #
If the o_CREAT
flag is set and the file already exists, fail the open.
Note In general, the behavior of o_EXCL
is undefined if it is used without o_CREAT
. There is one exception: on
Linux 2.6 and later, o_EXCL
can be used without o_CREAT
if pathname refers to a block device. If the block
device is in use by the system (e.g., mounted), the open will fail with the error EBUSY
.
pattern O_EXLOCK :: FileFlag Source #
Atomically obtain an exclusive lock.
Note UV_FS_O_EXLOCK is only supported on macOS and Windows. (libuv: Changed in version 1.17.0: support is added for Windows.)
pattern O_NOATIME :: FileFlag Source #
Do not update the file access time when the file is read.
Note o_NOATIME
is not supported on Windows.
pattern O_NOCTTY :: FileFlag Source #
If the path identifies a terminal device, opening the path will not cause that terminal to become the controlling terminal for the process (if the process does not already have one). (Not sure if this flag is useful)
Note o_NOCTTY
is not supported on Windows.
pattern O_NOFOLLOW :: FileFlag Source #
If the path is a symbolic link, fail the open.
Note o_NOFOLLOW
is not supported on Windows.
pattern O_NONBLOCK :: FileFlag Source #
Open the file in nonblocking mode if possible. (Definitely not useful in Z-IO)
Note o_NONBLOCK
is not supported on Windows. (Not useful on regular file anyway)
pattern O_RANDOM :: FileFlag Source #
Access is intended to be random. The system can use this as a hint to optimize file caching.
Note o_RANDOM
is only supported on Windows via FILE_FLAG_RANDOM_ACCESS
.
pattern O_SEQUENTIAL :: FileFlag Source #
Access is intended to be sequential from beginning to end. The system can use this as a hint to optimize file caching.
Note o_SEQUENTIAL
is only supported on Windows via FILE_FLAG_SEQUENTIAL_SCAN
.
pattern O_SHORT_LIVED :: FileFlag Source #
The file is temporary and should not be flushed to disk if possible.
Note o_SHORT_LIVED
is only supported on Windows via FILE_ATTRIBUTE_TEMPORARY
.
pattern O_SYMLINK :: FileFlag Source #
Open the symbolic link itself rather than the resource it points to.
pattern O_SYNC :: FileFlag Source #
The file is opened for synchronous IO. Write operations will complete once all data and all metadata are flushed to disk.
Note o_SYNC
is supported on Windows via FILE_FLAG_WRITE_THROUGH
.
pattern O_TEMPORARY :: FileFlag Source #
The file is temporary and should not be flushed to disk if possible.
Note o_TEMPORARY
is only supported on Windows via FILE_ATTRIBUTE_TEMPORARY
.
pattern O_TRUNC :: FileFlag Source #
If the file exists and is a regular file, and the file is opened successfully for write access, its length shall be truncated to zero.
newtype UVDirEntType Source #
Instances
data DirEntType Source #
Instances
peekUVDirEnt :: Ptr UVDirEnt -> IO (CString, UVDirEntType) Source #
hs_uv_fs_scandir_threaded :: CString -> Ptr (Ptr (Ptr UVDirEnt)) -> Ptr UVLoop -> IO UVSlotUnSafe Source #
data UVTimeSpec Source #
UVTimeSpec | |
|
Instances
UVStat | |
|
Instances
uvStatSize :: Int Source #
hs_uv_fs_stat_threaded :: CString -> Ptr UVStat -> Ptr UVLoop -> IO UVSlotUnSafe Source #
hs_uv_fs_fstat_threaded :: UVFD -> Ptr UVStat -> Ptr UVLoop -> IO UVSlotUnSafe Source #
hs_uv_fs_lstat_threaded :: CString -> Ptr UVStat -> Ptr UVLoop -> IO UVSlotUnSafe Source #
hs_uv_fs_rename_threaded :: CString -> CString -> Ptr UVLoop -> IO UVSlotUnSafe Source #
hs_uv_fs_fsync_threaded :: UVFD -> Ptr UVLoop -> IO UVSlotUnSafe Source #
hs_uv_fs_fdatasync_threaded :: UVFD -> Ptr UVLoop -> IO UVSlotUnSafe Source #
hs_uv_fs_ftruncate_threaded :: UVFD -> Int64 -> Ptr UVLoop -> IO UVSlotUnSafe Source #
newtype UVCopyFileFlag Source #
Flags control copying.
COPYFILE_EXCL
: If present, uv_fs_copyfile() will fail with UV_EEXIST if the destination path already exists. The default behavior is to overwrite the destination if it exists.COPYFILE_FICLONE
: If present, uv_fs_copyfile() will attempt to create a copy-on-write reflink. If the underlying platform does not support copy-on-write, then a fallback copy mechanism is used.
Instances
pattern COPYFILE_DEFAULT :: UVCopyFileFlag Source #
pattern COPYFILE_EXCL :: UVCopyFileFlag Source #
pattern COPYFILE_FICLONE :: UVCopyFileFlag Source #
hs_uv_fs_copyfile :: CString -> CString -> UVCopyFileFlag -> IO Int Source #
hs_uv_fs_copyfile_threaded :: CString -> CString -> UVCopyFileFlag -> Ptr UVLoop -> IO UVSlotUnSafe Source #
newtype UVAccessMode Source #
Instances
pattern F_OK :: UVAccessMode Source #
pattern R_OK :: UVAccessMode Source #
pattern W_OK :: UVAccessMode Source #
pattern X_OK :: UVAccessMode Source #
data AccessResult Source #
Instances
Eq AccessResult Source # | |
Defined in Z.IO.UV.FFI (==) :: AccessResult -> AccessResult -> Bool # (/=) :: AccessResult -> AccessResult -> Bool # | |
Ord AccessResult Source # | |
Defined in Z.IO.UV.FFI compare :: AccessResult -> AccessResult -> Ordering # (<) :: AccessResult -> AccessResult -> Bool # (<=) :: AccessResult -> AccessResult -> Bool # (>) :: AccessResult -> AccessResult -> Bool # (>=) :: AccessResult -> AccessResult -> Bool # max :: AccessResult -> AccessResult -> AccessResult # min :: AccessResult -> AccessResult -> AccessResult # | |
Show AccessResult Source # | |
Defined in Z.IO.UV.FFI showsPrec :: Int -> AccessResult -> ShowS # show :: AccessResult -> String # showList :: [AccessResult] -> ShowS # |
hs_uv_fs_access :: CString -> UVAccessMode -> IO Int Source #
hs_uv_fs_access_threaded :: CString -> UVAccessMode -> Ptr UVLoop -> IO UVSlotUnSafe Source #
hs_uv_fs_chmod_threaded :: CString -> FileMode -> Ptr UVLoop -> IO UVSlotUnSafe Source #
hs_uv_fs_fchmod_threaded :: UVFD -> FileMode -> Ptr UVLoop -> IO UVSlotUnSafe Source #
hs_uv_fs_utime_threaded :: CString -> Double -> Double -> Ptr UVLoop -> IO UVSlotUnSafe Source #
hs_uv_fs_futime_threaded :: UVFD -> Double -> Double -> Ptr UVLoop -> IO UVSlotUnSafe Source #
newtype UVSymlinkFlag Source #
Instances
pattern SYMLINK_DEFAULT :: UVSymlinkFlag Source #
pattern SYMLINK_DIR :: UVSymlinkFlag Source #
pattern SYMLINK_JUNCTION :: UVSymlinkFlag Source #
hs_uv_fs_link_threaded :: CString -> CString -> Ptr UVLoop -> IO UVSlotUnSafe Source #
hs_uv_fs_symlink :: CString -> CString -> UVSymlinkFlag -> IO Int Source #
hs_uv_fs_symlink_threaded :: CString -> CString -> UVSymlinkFlag -> Ptr UVLoop -> IO UVSlotUnSafe Source #
hs_uv_fs_readlink_cleanup :: CString -> IO () Source #
hs_uv_fs_readlink_threaded :: CString -> Ptr CString -> Ptr UVLoop -> IO UVSlotUnSafe Source #
hs_uv_fs_realpath_threaded :: CString -> Ptr CString -> Ptr UVLoop -> IO UVSlotUnSafe Source #
newtype UVHandleType Source #
Instances
pattern UV_UNKNOWN_HANDLE :: UVHandleType Source #
pattern UV_ASYNC :: UVHandleType Source #
pattern UV_CHECK :: UVHandleType Source #
pattern UV_FS_EVENT :: UVHandleType Source #
pattern UV_FS_POLL :: UVHandleType Source #
pattern UV_HANDLE :: UVHandleType Source #
pattern UV_IDLE :: UVHandleType Source #
pattern UV_NAMED_PIPE :: UVHandleType Source #
pattern UV_POLL :: UVHandleType Source #
pattern UV_PREPARE :: UVHandleType Source #
pattern UV_PROCESS :: UVHandleType Source #
pattern UV_STREAM :: UVHandleType Source #
pattern UV_TCP :: UVHandleType Source #
pattern UV_TIMER :: UVHandleType Source #
pattern UV_TTY :: UVHandleType Source #
pattern UV_UDP :: UVHandleType Source #
pattern UV_SIGNAL :: UVHandleType Source #
pattern UV_FILE :: UVHandleType Source #
uv_guess_handle :: UVFD -> IO UVHandleType Source #