Provides the ability to read/write/lock/inspect a file in the effect F
.
Attributes
- Companion
- object
- Source
- FileHandle.scala
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
Members list
Type members
Inherited types
Opaque type representing an exclusive lock on a file.
Opaque type representing an exclusive lock on a file.
Attributes
- Inherited from:
- FileHandlePlatform (hidden)
- Source
- FileHandlePlatform.scala
Value members
Abstract methods
Force any updates for the underlying file to storage.
Force any updates for the underlying file to storage.
Value parameters
- metaData
-
If true, also attempts to force file metadata updates to storage.
Attributes
- Source
- FileHandle.scala
Read the specified number of bytes at a particular offset.
Read the specified number of bytes at a particular offset.
Value parameters
- numBytes
-
the number of bytes to read.
- offset
-
the offset from the start of the file.
Attributes
- Returns
-
a number of bytes from the file (at most, numBytes in size).
- Source
- FileHandle.scala
Report the current size of the file.
Report the current size of the file.
Attributes
- Returns
-
the size of the file.
- Source
- FileHandle.scala
Truncate the underlying file to the specified size.
Truncate the underlying file to the specified size.
Value parameters
- size
-
the size of the file after truncation.
Attributes
- Source
- FileHandle.scala
Write the specified bytes at a particular offset.
Write the specified bytes at a particular offset.
Value parameters
- bytes
-
the bytes to write to the
FileHandle
. - offset
-
the offset at which to write the bytes.
Attributes
- Returns
-
the number of bytes written.
- Source
- FileHandle.scala
Inherited methods
Acquire a lock on the specified region of the underlying file.
Acquire a lock on the specified region of the underlying file.
Value parameters
- position
-
the start of the region to lock.
- shared
-
to request a shared lock across process boundaries (may be converted to an exclusive lock on some operating systems).
- size
-
the size of the region to lock.
Attributes
- Returns
-
a lock object which can be used to unlock the region.
- Inherited from:
- FileHandlePlatform (hidden)
- Source
- FileHandlePlatform.scala
Acquire an exclusive lock on the underlying file.
Acquire an exclusive lock on the underlying file.
Attributes
- Returns
-
a lock object which can be used to unlock the file.
- Inherited from:
- FileHandlePlatform (hidden)
- Source
- FileHandlePlatform.scala
Attempt to acquire a lock on the specified region of the underlying file.
Attempt to acquire a lock on the specified region of the underlying file.
Value parameters
- position
-
the start of the region to lock.
- shared
-
to request a shared lock across process boundaries (may be converted to an exclusive lock on some operating systems).
- size
-
the size of the region to lock.
Attributes
- Returns
-
if the lock could be acquired, a lock object which can be used to unlock the region.
- Inherited from:
- FileHandlePlatform (hidden)
- Source
- FileHandlePlatform.scala
Attempt to acquire an exclusive lock on the underlying file.
Attempt to acquire an exclusive lock on the underlying file.
Attributes
- Returns
-
if the lock could be acquired, a lock object which can be used to unlock the file.
- Inherited from:
- FileHandlePlatform (hidden)
- Source
- FileHandlePlatform.scala
Unlock the (exclusive or regional) lock represented by the supplied Lock
.
Unlock the (exclusive or regional) lock represented by the supplied Lock
.
Value parameters
- lock
-
the lock object which represents the locked file or region.
Attributes
- Inherited from:
- FileHandlePlatform (hidden)
- Source
- FileHandlePlatform.scala