saveFile abstract method
Stream<SaveProgress>
saveFile({
- required String filePath,
- required String fileName,
- required FileType fileType,
- SaveLocation? saveLocation,
- String? subDir,
- ConflictResolution conflictResolution = ConflictResolution.autoRename,
Saves a file from filePath to device storage with progress streaming.
Platforms: Android · iOS · macOS · Windows · Linux (Web: not supported — browsers cannot access arbitrary file paths)
Streams in chunks — suitable for large files.
filePath: Source path (file:// URI or content:// URI on Android)saveLocation: Where to save the file (platform-specific, optional)subDir: Optional subdirectory within the standard save locationconflictResolution: How to handle filename conflicts
Yields SaveProgress events during save operation.
Throws SourceFileNotFoundException if the source file does not exist. Throws ICloudDownloadException on iOS if iCloud file download fails.
Implementation
Stream<SaveProgress> saveFile({
required String filePath,
required String fileName,
required FileType fileType,
SaveLocation? saveLocation,
String? subDir,
ConflictResolution conflictResolution = ConflictResolution.autoRename,
});