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 SockAddr -> CUInt -> IO CInt
- hs_uv_tcp_connect :: Ptr UVHandle -> Ptr SockAddr -> IO UVSlotUnSafe
- hs_set_socket_reuse :: Ptr UVHandle -> IO CInt
- 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 SockAddr -> 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_set_membership :: Ptr UVHandle -> 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 SockAddr -> Ptr Word8 -> Int -> IO UVSlotUnSafe
- uv_udp_getsockname :: Ptr UVHandle -> Ptr SockAddr -> Ptr CInt -> IO CInt
- uv_pipe_init :: Ptr UVLoop -> Ptr UVHandle -> 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
- newtype UVFileMode = UVFileMode CInt
- pattern S_IRWXU :: UVFileMode
- pattern S_IRUSR :: UVFileMode
- pattern S_IWUSR :: UVFileMode
- pattern S_IXUSR :: UVFileMode
- pattern S_IRWXG :: UVFileMode
- pattern S_IRGRP :: UVFileMode
- pattern S_IWGRP :: UVFileMode
- pattern S_IXGRP :: UVFileMode
- pattern S_IRWXO :: UVFileMode
- pattern S_IROTH :: UVFileMode
- pattern S_IWOTH :: UVFileMode
- pattern S_IXOTH :: UVFileMode
- pattern DEFAULT_MODE :: UVFileMode
- hs_uv_fs_open :: CString -> UVFileFlag -> UVFileMode -> 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 -> UVFileMode -> IO Int
- hs_uv_fs_rmdir :: CString -> IO Int
- hs_uv_fs_mkdtemp :: CString -> Int -> CString -> IO Int
- hs_uv_fs_open_threaded :: CString -> UVFileFlag -> UVFileMode -> 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 -> UVFileMode -> 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 UVFileFlag = UVFileFlag CInt
- pattern O_APPEND :: UVFileFlag
- pattern O_CREAT :: UVFileFlag
- pattern O_DIRECT :: UVFileFlag
- pattern O_DIRECTORY :: UVFileFlag
- pattern O_DSYNC :: UVFileFlag
- pattern O_EXCL :: UVFileFlag
- pattern O_EXLOCK :: UVFileFlag
- pattern O_NOATIME :: UVFileFlag
- pattern O_NOCTTY :: UVFileFlag
- pattern O_NOFOLLOW :: UVFileFlag
- pattern O_NONBLOCK :: UVFileFlag
- pattern O_RANDOM :: UVFileFlag
- pattern O_RDONLY :: UVFileFlag
- pattern O_RDWR :: UVFileFlag
- pattern O_SEQUENTIAL :: UVFileFlag
- pattern O_SHORT_LIVED :: UVFileFlag
- pattern O_SYMLINK :: UVFileFlag
- pattern O_SYNC :: UVFileFlag
- pattern O_TEMPORARY :: UVFileFlag
- pattern O_TRUNC :: UVFileFlag
- pattern O_WRONLY :: UVFileFlag
- 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 -> UVFileMode -> IO Int
- hs_uv_fs_chmod_threaded :: CString -> UVFileMode -> Ptr UVLoop -> IO UVSlotUnSafe
- hs_uv_fs_fchmod :: UVFD -> UVFileMode -> IO Int
- hs_uv_fs_fchmod_threaded :: UVFD -> UVFileMode -> 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 #
hs_uv_tcp_connect :: Ptr UVHandle -> Ptr SockAddr -> IO UVSlotUnSafe Source #
newtype UVMembership Source #
Instances
Eq UVMembership Source # | |
Defined in Std.IO.UV.FFI (==) :: UVMembership -> UVMembership -> Bool # (/=) :: UVMembership -> UVMembership -> Bool # | |
Ord UVMembership Source # | |
Defined in Std.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 Std.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_set_membership :: Ptr UVHandle -> CString -> CString -> UVMembership -> 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 #
newtype UVFileMode Source #
Instances
pattern S_IRWXU :: UVFileMode Source #
00700 user (file owner) has read, write and execute permission
pattern S_IRUSR :: UVFileMode Source #
00400 user has read permission
pattern S_IWUSR :: UVFileMode Source #
00200 user has write permission
pattern S_IXUSR :: UVFileMode Source #
00100 user has execute permission
pattern S_IRWXG :: UVFileMode Source #
00070 group has read, write and execute permission
pattern S_IRGRP :: UVFileMode Source #
00040 group has read permission
pattern S_IWGRP :: UVFileMode Source #
00020 group has write permission
pattern S_IXGRP :: UVFileMode Source #
00010 group has execute permission
pattern S_IRWXO :: UVFileMode Source #
00007 others have read, write and execute permission
pattern S_IROTH :: UVFileMode Source #
00004 others have read permission
pattern S_IWOTH :: UVFileMode Source #
00002 others have write permission
pattern S_IXOTH :: UVFileMode Source #
00001 others have execute permission
pattern DEFAULT_MODE :: UVFileMode Source #
Default mode for open, 0o666(readable and writable).
hs_uv_fs_open :: CString -> UVFileFlag -> UVFileMode -> IO UVFD Source #
hs_uv_fs_mkdir :: CString -> UVFileMode -> IO Int Source #
hs_uv_fs_open_threaded :: CString -> UVFileFlag -> UVFileMode -> 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 -> UVFileMode -> 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 #
newtype UVFileFlag Source #
Instances
pattern O_APPEND :: UVFileFlag Source #
The file is opened in append mode. Before each write, the file offset is positioned at the end of the file.
pattern O_CREAT :: UVFileFlag Source #
The file is created if it does not already exist.
pattern O_DIRECT :: UVFileFlag 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 stdio's BufferedIO
)
pattern O_DIRECTORY :: UVFileFlag 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 :: UVFileFlag 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 :: UVFileFlag 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 :: UVFileFlag 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 :: UVFileFlag Source #
Do not update the file access time when the file is read.
Note o_NOATIME
is not supported on Windows.
pattern O_NOCTTY :: UVFileFlag 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 :: UVFileFlag Source #
If the path is a symbolic link, fail the open.
Note o_NOFOLLOW
is not supported on Windows.
pattern O_NONBLOCK :: UVFileFlag Source #
Open the file in nonblocking mode if possible. (Definitely not useful with stdio)
Note o_NONBLOCK
is not supported on Windows. (Not useful on regular file anyway)
pattern O_RANDOM :: UVFileFlag 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_RDONLY :: UVFileFlag Source #
Open the file for read-only access.
pattern O_RDWR :: UVFileFlag Source #
Open the file for read-write access.
pattern O_SEQUENTIAL :: UVFileFlag 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 :: UVFileFlag 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 :: UVFileFlag Source #
Open the symbolic link itself rather than the resource it points to.
pattern O_SYNC :: UVFileFlag 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 :: UVFileFlag 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 :: UVFileFlag 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.
pattern O_WRONLY :: UVFileFlag Source #
Open the file for write-only access.
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 Std.IO.UV.FFI (==) :: AccessResult -> AccessResult -> Bool # (/=) :: AccessResult -> AccessResult -> Bool # | |
Ord AccessResult Source # | |
Defined in Std.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 Std.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 :: CString -> UVFileMode -> IO Int Source #
hs_uv_fs_chmod_threaded :: CString -> UVFileMode -> Ptr UVLoop -> IO UVSlotUnSafe Source #
hs_uv_fs_fchmod :: UVFD -> UVFileMode -> IO Int Source #
hs_uv_fs_fchmod_threaded :: UVFD -> UVFileMode -> 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 #