package file
- Alphabetic
- By Inheritance
- file
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Type Members
-
trait
FileHandle[F[_]] extends AnyRef
Provides the ability to read/write/lock/inspect a file in the effect
F
.Provides the ability to read/write/lock/inspect a file in the effect
F
.To construct a
FileHandle
, use the methods in the fs2.io.file.pulls object.
Value Members
-
def
readAll[F[_]](path: Path, blockingExecutionContext: ExecutionContext, chunkSize: Int)()(implicit arg0: Sync[F], arg1: ContextShift[F]): Stream[F, Byte]
Reads all data synchronously from the file at the specified
java.nio.file.Path
. -
def
readRange[F[_]](path: Path, blockingExecutionContext: ExecutionContext, chunkSize: Int, start: Long, end: Long)()(implicit arg0: Sync[F], arg1: ContextShift[F]): Stream[F, Byte]
Reads a range of data synchronously from the file at the specified
java.nio.file.Path
.Reads a range of data synchronously from the file at the specified
java.nio.file.Path
.start
is inclusive,end
is exclusive, so whenstart
is 0 andend
is 2, two bytes are read. -
def
watch[F[_]](path: Path, types: Seq[EventType] = Nil, modifiers: Seq[Modifier] = Nil, pollTimeout: FiniteDuration = 1.second)(implicit F: Concurrent[F]): Stream[F, Event]
Watches a single path.
Watches a single path.
Alias for creating a watcher and watching the supplied path, releasing the watcher when the resulting stream is finalized.
-
def
watcher[F[_]](implicit F: Concurrent[F]): Resource[F, Watcher[F]]
Creates a Watcher for the default file system.
Creates a Watcher for the default file system.
A singleton bracketed stream is returned consisting of the single watcher. To use the watcher,
flatMap
the returned stream, watch or register 1 or more paths, and then returnwatcher.events()
.- returns
singleton bracketed stream returning a watcher
-
def
writeAll[F[_]](path: Path, blockingExecutionContext: ExecutionContext, flags: Seq[StandardOpenOption] = List(StandardOpenOption.CREATE))(implicit arg0: Sync[F], arg1: ContextShift[F]): Pipe[F, Byte, Unit]
Writes all data synchronously to the file at the specified
java.nio.file.Path
.Writes all data synchronously to the file at the specified
java.nio.file.Path
.Adds the WRITE flag to any other
OpenOption
flags specified. By default, also adds the CREATE flag. -
object
pulls
Provides various
Pull
s for working with files.