SafStream class
Properties
-
hashCode
→ int
-
The hash code for this object.
no setterinherited
-
runtimeType
→ Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
copyToLocalFile(String srcUri, String destPath)
→ Future<void>
-
Copies a SAF file from the given
srcUri to a local file destPath.
-
endReadCustomFileStream(String session)
→ Future<void>
-
Closes a custom file stream identified by the given
session.
-
endWriteStream(String session)
→ Future<void>
-
Closes an out stream identified by the given
session.
-
noSuchMethod(Invocation invocation)
→ dynamic
-
Invoked when a nonexistent method or property is accessed.
inherited
-
pasteLocalFile(String srcPath, String treeUri, String fileName, String mime, {bool? overwrite, bool? append})
→ Future<SafNewFile>
-
Copies the contents of a local file
srcPath and creates a new file
from the given treeUri, fileName and mime.
-
readCustomFileStreamChunk(String session)
→ Future<Uint8List?>
-
Reads a chunk of bytes from a custom file stream identified by the given
session.
-
readFileBytes(String uri, {int? start, int? count})
→ Future<Uint8List>
-
Reads the contents of a file from the given
uri. Unlike readFileStream,
this method reads the entire file at once and returns a Uint8List.
-
readFileStream(String uri, {int? bufferSize, int? start})
→ Future<Stream<Uint8List>>
-
Reads the contents of a file from the given
uri and returns a stream of bytes.
-
readFileSync(String uri, {int? start, int? count})
→ Future<Uint8List>
-
Reads the contents of a file from the given
uri. Unlike readFileStream,
this method reads the entire file at once and returns a Uint8List.
-
skipCustomFileStreamChunk(String session, int count)
→ Future<int>
-
Skips
count bytes from a custom file stream identified by the given session.
-
startReadCustomFileStream(String uri, {int? bufferSize})
→ Future<String>
-
Like readFileStream, but returns a session where you can control the reading process.
-
startWriteStream(String treeUri, String fileName, String mime, {bool? overwrite, bool? append})
→ Future<SafWriteStreamInfo>
-
Returns a SafWriteStreamInfo. Call writeChunk with the
session from SafWriteStreamInfo
to write data into the destination stream. Call endWriteStream to close the destination stream.
-
toString()
→ String
-
A string representation of this object.
inherited
-
writeChunk(String session, Uint8List data)
→ Future<void>
-
Writes the given
data to an out stream identified by the given session.
-
writeFileBytes(String treeUri, String fileName, String mime, Uint8List data, {bool? overwrite, bool? append})
→ Future<SafNewFile>
-
Writes the given
data to a file identified by the given treeUri, fileName and mime.
-
writeFileSync(String treeUri, String fileName, String mime, Uint8List data, {bool? overwrite, bool? append})
→ Future<SafNewFile>
-
Writes the given
data to a file identified by the given treeUri, fileName and mime.