2-- Module : Streamly.FileSystem.File
3-- Copyright : (c) 2019 Composewell Technologies
6-- Maintainer : streamly@composewell.com
7-- Stability : pre-release
10-- Read and write streams and arrays to and from files specified by their paths
11-- in the file system. Unlike the handle based APIs which can have a read/write
12-- session consisting of multiple reads and writes to the handle, these APIs
13-- are one shot read or write APIs. These APIs open the file handle, perform
14-- the requested operation and close the handle. Thease are safer compared to
15-- the handle based APIs as there is no possibility of a file descriptor
18-- > import qualified Streamly.FileSystem.File as File
20module Streamly.FileSystem.File
23 -- | Stream data to or from a file or device sequentially. When reading,
24 -- the stream is lazy and generated on-demand as the consumer consumes it.
25 -- Read IO requests to the IO device are performed in chunks limited to a
26 -- maximum size of 32KiB, this is referred to as @defaultChunkSize@ in the
27 -- documentation. One IO request may or may not read the full
28 -- chunk. If the whole stream is not consumed, it is possible that we may
29 -- read slightly more from the IO device than what the consumer needed.
30 -- Unless specified otherwise in the API, writes are collected into chunks
31 -- of @defaultChunkSize@ before they are written to the IO device.
33 -- Streaming APIs work for all kind of devices, seekable or non-seekable;
34 -- including disks, files, memory devices, terminals, pipes, sockets and
35 -- fifos. While random access APIs work only for files or devices that have
36 -- random access or seek capability for example disks, memory devices.
37 -- Devices like terminals, pipes, sockets and fifos do not have random
40 -- ** File IO Using Handle
55import Streamly.Internal.FileSystem.File
56import Prelude hiding (read)
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list