FsFile$Typings extension

on

Properties

readable → ReadableStream<Uint8List>

Available on FsFile, provided by the FsFile$Typings extension

A {@linkcode ReadableStream} instance representing to the byte contents of the file. This makes it easy to interoperate with other web streams based APIs.
no setter
rid → num

Available on FsFile, provided by the FsFile$Typings extension

The resource ID associated with the file instance. The resource ID should be considered an opaque reference to resource.
no setter
writable → WritableStream<Uint8List>

Available on FsFile, provided by the FsFile$Typings extension

A {@linkcode WritableStream} instance to write the contents of the file. This makes it easy to interoperate with other web streams based APIs.
no setter

Methods

close() → void

Available on FsFile, provided by the FsFile$Typings extension

Close the file. Closing a file when you are finished with it is important to avoid leaking resources.
read(Uint8List p) → Future<num?>

Available on FsFile, provided by the FsFile$Typings extension

Read the file into an array buffer (p).
readSync(Uint8List p) → num?

Available on FsFile, provided by the FsFile$Typings extension

Synchronously read from the file into an array buffer (p).
seek(Object offset, SeekMode whence) → Future<num>

Available on FsFile, provided by the FsFile$Typings extension

Seek to the given offset under mode given by whence. The call resolves to the new position within the resource (bytes from the start).
seekSync(Object offset, SeekMode whence) → num

Available on FsFile, provided by the FsFile$Typings extension

Synchronously seek to the given offset under mode given by whence. The new position within the resource (bytes from the start) is returned.
stat() → Future<FileInfo>

Available on FsFile, provided by the FsFile$Typings extension

Resolves to a {@linkcode Deno.FileInfo} for the file.
statSync() → FileInfo

Available on FsFile, provided by the FsFile$Typings extension

Synchronously returns a {@linkcode Deno.FileInfo} for the file.
truncate([num? len]) → Future<void>

Available on FsFile, provided by the FsFile$Typings extension

Truncates (or extends) the file to reach the specified len. If len is not specified, then the entire file contents are truncated.
truncateSync([num? len]) → void

Available on FsFile, provided by the FsFile$Typings extension

Synchronously truncates (or extends) the file to reach the specified len. If len is not specified, then the entire file contents are truncated.
write(Uint8List p) → Future<num>

Available on FsFile, provided by the FsFile$Typings extension

Write the contents of the array buffer (p) to the file.
writeSync(Uint8List p) → num

Available on FsFile, provided by the FsFile$Typings extension

Synchronously write the contents of the array buffer (p) to the file.