Comments (2)
We won't want to do it this way, but out of interest, I tried using the WebSQL shim at http://nparashuram.com/IndexedDBShim/ and in Safari on OS X 10.6.8 it fails 10 tests:
52 specs | 10 failing
fs should have a root directory.
timeout: timed out after 5000 msec waiting for test to complete
fs.writeFile, fs.readFile should write, read a utf8 file without specifying utf8 in writeFile.
timeout: timed out after 5000 msec waiting for test to complete
fs.writeFile, fs.readFile should write, read a utf8 file with "utf8" option to writeFile.
timeout: timed out after 5000 msec waiting for test to complete
fs.writeFile, fs.readFile should write, read a utf8 file with {encoding: "utf8"} option to writeFile.
timeout: timed out after 5000 msec waiting for test to complete
fs.writeFile, fs.readFile should write, read a binary file.
timeout: timed out after 5000 msec waiting for test to complete
fs.read should read data from a file.
timeout: timed out after 5000 msec waiting for test to complete
fs.read should update the current file position.
timeout: timed out after 5000 msec waiting for test to complete
fs.lseek should set the current position if whence is SET.
timeout: timed out after 5000 msec waiting for test to complete
fs.lseek should update the current position if whence is CUR.
timeout: timed out after 5000 msec waiting for test to complete
fs.lseek should update the current position if whence is END.
timeout: timed out after 5000 msec waiting for test to complete
And this was on the console:
0
idbfs.js:8742TypeError: 'undefined' is not an object (evaluating 'fileData.subarray')
IndexedDBShim.min.js:20
idbfs.js:8742TypeError: 'undefined' is not an object (evaluating 'fileData.subarray')
IndexedDBShim.min.js:20
idbfs.js:8742TypeError: 'undefined' is not an object (evaluating 'fileData.subarray')
Which is failing in:
function handle_file_data(error, result) {
if(error) {
callback(error);
} else {
fileData = result;
var _position = (!(undefined === position || null === position)) ? position : ofd.position;
length = (_position + length > buffer.length) ? length - _position : length;
/** Here... **/
var dataView = fileData.subarray(_position, _position + length); // <--------------------
buffer.set(dataView, offset);
if(undefined === position) {
ofd.position += length;
}
callback(undefined, length);
}
}
}
Code is in my websql-shim branch: https://github.com/humphd/idbfs/compare/websql-shim?expand=1
from filer.
I've started abstracting out the idb-specific parts, so it might be worth trying this by hand rather than debugging the shim.
from filer.
Related Issues (20)
- Support fs.open() flags being a number vs. string HOT 5
- Add find_symlink_node() to allow l* methods (lstat, lchown, etc) to use find_node like functionality HOT 4
- Export FS type to the user HOT 2
- Shell.mkdirp does not support relative paths HOT 4
- Use case HOT 1
- npm test only running shim tests HOT 10
- Incorrect documentation for Buffer shim HOT 2
- path module not shimmed correctly
- BUG: unexpected failures when calling fs functions (e.g. writeFile) with empty options object HOT 4
- BUG: fs.readdir fails when passing options HOT 4
- BUG: fs.mkdir does not recursively create parent directories when called with { recursive: true } HOT 2
- Add tests for new code paths from PR #774 HOT 1
- fs.opendir not implemented
- Typescript Support HOT 2
- web ide: Support for File System Access APIs as a Storage Provider? HOT 7
- GitHub Actions Workflow failing
- Webpack entry cannot be found after importing filer HOT 15
- Shims are not available in NPM package HOT 8
- Critical dependency: the request of a dependency is an expression HOT 3
- Maintenance of Filer
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from filer.