Skip to content

Commit

Permalink
Enforce raw types for export directory
Browse files Browse the repository at this point in the history
  • Loading branch information
CodeDoctorDE committed Jan 7, 2025
1 parent 6113171 commit 59ea870
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/lw_file_system/lib/src/api/file_system_base.dart
Original file line number Diff line number Diff line change
Expand Up @@ -91,17 +91,17 @@ abstract class GeneralFileSystem {
Future.value(false);
}

Archive exportDirectory(FileSystemDirectory directory, {int? lastModTime}) {
Archive exportDirectory(RawFileSystemDirectory directory, {int? lastModTime}) {
final archive = Archive();
void addToArchive(FileSystemEntity asset) {
if (asset is FileSystemFile) {
if (asset is RawFileSystemFile) {
final data = asset.data;
if (data == null) return;
final size = data.length;
final file = ArchiveFile(asset.path, size, data);
if (lastModTime != null) file.lastModTime = lastModTime;
archive.addFile(file);
} else if (asset is FileSystemDirectory) {
} else if (asset is RawFileSystemDirectory) {
var assets = asset.assets;
for (var current in assets) {
addToArchive(current);
Expand Down

0 comments on commit 59ea870

Please sign in to comment.