interface AsyncFile
source · line 12public
public interface AsyncFile : AsyncByteSource, AsyncByteSink, AsyncCloseable
- Supertype
AsyncByteSource - Supertype
AsyncByteSink - Supertype
AsyncCloseable - Inherited
suspend fun close(): Unit· AsyncCloseable - Inherited
suspend fun flush(): Unit· AsyncByteSink - Inherited
suspend fun readInto(buffer: NativeByteBuffer, count: Long): Long· AsyncByteSource - Inherited
suspend fun writeFrom(buffer: NativeByteBuffer, count: Long): Long· AsyncByteSink
An owned asynchronous file with a shared logical position, explicit seek, truncation, and durability operations.
function syncAll
source · line 40public
public suspend fun syncAll(): Unit
Requests persistence of file data and full associated metadata.
function truncate
source · line 32public
public suspend fun truncate(size: Long): Unit
Sets the file length in bytes according to the open file's write permissions.
parameter size
source · line 32public
size: Long
function metadata
source · line 16public
public suspend fun metadata(): FileMetadata
Obtains metadata for the open file.
function syncData
source · line 36public
public suspend fun syncData(): Unit
Requests persistence of file data and metadata needed to retrieve it.
function size
source · line 20public
public suspend fun size(): Long
Returns the current file size in bytes.
function seek
source · line 28public
public suspend fun seek(position: Long): Unit
Sets the logical byte position; negative positions are invalid.
parameter position
source · line 28public
position: Long
function position
source · line 24public
public suspend fun position(): Long
Returns the current logical byte position.