fs2.io.file
Type members
Classlikes
Attributes of a file that are provided by most operating systems and file systems.
Attributes of a file that are provided by most operating systems and file systems.
To get an instance of BasicFileAttributes, use Files[F].getBasicFileAttributes(path).
The fileKey operation returns a unique identifier for the file, if the operating system
and file system supports providing such an identifier.
- Companion:
- object
- Source:
- FileAttributes.scala
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.
- Companion:
- object
- Source:
- FileHandle.scala
An opaque, unique identifier for a file.
An opaque, unique identifier for a file.
Paths which have the same FileKey (via univerals equals),
as reported by Files[F].getBasicFileAttributes(path).fileKey,
are guaranteed to reference the same file on the file system.
Note: not all operating systems and file systems support file keys,
hence BasicFileAttributes#fileKey returns an Option[FileKey].
- Companion:
- object
- Source:
- FileKey.scala
Provides operations related to working with files in the effect F.
Provides operations related to working with files in the effect F.
An instance is available for any effect F which has an Async[F] instance.
The operations on this trait are implemented for both the JVM and Node.js.
Some operations only work on POSIX file systems, though such methods generally
have "Posix" in their names (e.g. getPosixPermissions). A small number of methods
are only available on the JVM (e.g. variant of list which takes a glob pattern) and
are indicated as such in their ScalaDoc.
- Companion:
- object
- Source:
- Files.scala
Flags describing how a file should be opened by Files[F].open(path, flags).
Flags describing how a file should be opened by Files[F].open(path, flags).
Common flag combinations are available in the companion (e.g. Flags.Write)
Custom combinations are supported via the apply method
(e.g., Flags(Flag.Write, Flag.CreateNew)).
- Companion:
- object
- Source:
- Flags.scala
Describes the permissions of a file / directory.
Describes the permissions of a file / directory.
Note: currently, there is only one subtype -- PosixPermissions.
More types may be added in the future (e.g. Windows ACLs).
- Source:
- Permissions.scala
Describes POSIX file permissions, where the user, group, and others are each assigned read, write, and/or execute permissions.
Describes POSIX file permissions, where the user, group, and others are each assigned read, write, and/or execute permissions.
The toString method provides a 9 character string where the first
three characters indicate user permissions, the next three group permissions,
and the final three others permissions. For example, rwxr-xr-- indicates
the owner has read, write and execute, the group as read and execute, and
others have read.
The value field encodes the permissions in the lowest 9 bits of an integer.
bits 8-6 indicate read, write, and execute for the owner, 5-3 for the group,
and 2-0 for others. rwxr-xr-- has the integer value 111101100 = 492.
The toOctalString method returns the a 3 digit string, where the first
character indicates read, write and execute for the owner, the second digit
for the group, and the third digit for others. rwxr-xr-- has the octal string
754.
Constructors from strings, octal strings, and integers, as well as explicitly enumerating permissions, are provided in the companion.
- Companion:
- object
- Source:
- Permissions.scala
Associates a FileHandle with an offset in to the file.
Associates a FileHandle with an offset in to the file.
This encapsulates the pattern of incrementally reading bytes in from a file, a chunk at a time. Convenience methods are provided for working with pulls.
- Companion:
- object
- Source:
- ReadCursor.scala
Associates a FileHandle with an offset in to the file.
Associates a FileHandle with an offset in to the file.
This encapsulates the pattern of incrementally writing bytes in to a file, a chunk at a time. Convenience methods are provided for working with pulls.
- Companion:
- object
- Source:
- WriteCursor.scala