| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Database.DuckDB.Simple.FileSystem
Description
Synopsis
- withFileHandle :: Connection -> FilePath -> [DuckDBFileFlag] -> (DuckDBFileHandle -> IO a) -> IO a
- readFileHandleChunk :: DuckDBFileHandle -> Int64 -> IO ByteString
- writeFileHandleBytes :: DuckDBFileHandle -> ByteString -> IO Int64
- fileHandleTell :: DuckDBFileHandle -> IO Int64
- fileHandleSize :: DuckDBFileHandle -> IO Int64
- fileHandleSeek :: DuckDBFileHandle -> Int64 -> IO ()
- fileHandleSync :: DuckDBFileHandle -> IO ()
Documentation
withFileHandle :: Connection -> FilePath -> [DuckDBFileFlag] -> (DuckDBFileHandle -> IO a) -> IO a Source #
Open a file through DuckDB's file-system layer for the duration of an action.
readFileHandleChunk :: DuckDBFileHandle -> Int64 -> IO ByteString Source #
Read up to the requested number of bytes from a file handle.
writeFileHandleBytes :: DuckDBFileHandle -> ByteString -> IO Int64 Source #
Write an entire bytestring to a file handle.
fileHandleTell :: DuckDBFileHandle -> IO Int64 Source #
Return the current file position.
fileHandleSize :: DuckDBFileHandle -> IO Int64 Source #
Return the current file size in bytes.
fileHandleSeek :: DuckDBFileHandle -> Int64 -> IO () Source #
Seek to an absolute byte offset.
fileHandleSync :: DuckDBFileHandle -> IO () Source #
Flush file-handle writes to stable storage.