2.1.0 • Published 10 years ago
web-fs v2.1.0
web-fs
Node's fs interface for Web File System API and Chrome Packaged Apps.
Based on johnnyscript's nota-bene but allows specifying root entry.
Install via npm
$ npm install web-fsUse with browserify!
API
var WebFS = require('web-fs')var fs = WebFS(entry)
Create an instance of WebFS with a root directory specified by entry (DirectoryEntry).
Web File System API example:
var fs = null
navigator.webkitPersistentStorage.requestQuota(1024*1024, function(grantedBytes) {
window.webkitRequestFileSystem(PERSISTENT, grantedBytes, function(result){
fs = WebFS(result.root)
})
})Chrome Packaged App File System example:
var fs = null
// browse for root directory
chrome.fileSystem.chooseEntry({type: 'openDirectory'}, function(entry){
fs = WebFS(entry)
})Instance methods
fs.closefs.createReadStreamfs.createWriteStreamfs.existsfs.mkdirfs.openfs.readFilefs.readfs.readdirfs.renamefs.rmdirfs.statfs.truncatefs.unlinkfs.writeFilefs.writefs.watchFilefs.unwatchFilefs.watch
2.1.0
10 years ago
2.0.0
10 years ago
1.7.0
11 years ago
1.6.0
11 years ago
1.5.1
11 years ago
1.5.0
11 years ago
1.4.2
11 years ago
1.4.1
11 years ago
1.4.0
11 years ago
1.3.0
11 years ago
1.2.1
11 years ago
1.2.0
11 years ago
1.1.0
11 years ago
1.0.1
11 years ago
1.0.0
11 years ago
0.2.0
12 years ago
0.1.0
12 years ago
0.0.0
12 years ago