SafStream class
Properties
hashCode
→ int
The hash code for this object.
no setter inherited
runtimeType
→ Type
A representation of the runtime type of the object.
no setter inherited
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.
startWriteFileUriStream (String fileUri , {bool ? append })
→ Future <SafWriteStreamInfo >
Creates a file stream for writing data to a file identified by the given fileUri.
startWriteStream (String treeUri , String fileName , String mime , {bool ? overwrite , bool ? append })
→ Future <SafWriteStreamInfo >
Creates a file stream for writing data to a file identified by the given treeUri, fileName and mime.
Note that SAF may change the file name if a file with the same name already exists. The resulting
SafNewFile contains the actual file name and Uri.
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.
Note that SAF may change the file name if a file with the same name already exists. The resulting
SafNewFile contains the actual file name and Uri.
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.
writeFileUriBytes (String fileUri , Uint8List data , {bool ? append })
→ Future <SafNewFile >
Writes the given data to a file identified by the given fileUri.
Note that SAF may change the file name if a file with the same name already exists. The resulting
SafNewFile contains the actual file name and Uri.