tekartik / fs_shim.dart Goto Github PK
View Code? Open in Web Editor NEWFileSystem shim to allow saving file in IndexedDB or memory
License: BSD 2-Clause "Simplified" License
FileSystem shim to allow saving file in IndexedDB or memory
License: BSD 2-Clause "Simplified" License
I need a solution that works for large files (GB+) within a browser.
The storage system must not require any user interactions to create/read/write files.
The storage system needs to provide seek style operations with efficient read/write operations to parts of a large file.
Does fs_shim allow this?
I can't find any references to the likes of RandomAccessFile.
I'm assuming that give fs_shim is backed by indexed_db that it requires no user permissions but I'm unable to find any definitive statement on this.
When replacing
import 'dart:io';
with
import 'package:fs_shim/fs_io.dart';
It would be really handy to have Platform
class (from dart:io
) also supported when running on web.
So, calls like Platform.isAndroid
, Platform.isIOS
, etc. would return correct platform the web browser running in.
Currently the fs_io
doesn't seem to work on web and you have to fall back to fs_shim.dart
and direct use of fileSystemWeb.file()
in order to use File
API on the web.
It would be really neat if the fs_io
worked out of the box on the web too.
Hello I tried using your plug in Flutter for Web and it just does not work. Below is the code. Could you please help?
somethingElse()
async {
FileSystem fs = ioFileSystem;
// safe place when running from package root
String dirPath = (Directory.current.path);
// Create a top level directory
// fs.newDirectory('/dir');
Directory dir = new Directory(dirPath);
// delete its content
await dir.delete(recursive: true);
// and a file in it
// fs.newFile(join(dir.path, "file"));
File file = new File(dir.path+ "file.txt");
// create a file
await file.create(recursive: true);
await file.writeAsString("Hello world!");
// list dir content
print(await dir.list(recursive: true, followLinks: true).toList());
}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.