v1.4.0
版本发布时间: 2017-07-24 09:48:25
jvilk/BrowserFS最新发布版本:v1.4.3(2017-08-08 04:22:34)
This should be the last minor version of BrowserFS in the 1.x series. Future releases in the 1.x series will be limited to bug fixes.
This version standardizes the way that users instantiate BrowserFS backends, provides a much more convenient method of configuring BrowserFS as a whole, and should be significantly easier to use for newcomers to the library.
This version also adds deprecation notices to a number of APIs that will be removed in 2.x in favor of these more convenient and standardized instantiation methods.
Here are the changes in this version:
-
New convenience methods:
-
BrowserFS.configure(configObj, function(e) {})
: Configure BrowserFS with a single object. See the README for more information. This is the single best change to BrowserFS in this update! -
Create()
Methods: Every single file system has aCreate
function that accepts file system-specific options as an object and a callback. These are easy to promisify, but you don't even have to use these directly if you useBrowserFS.configure
! -
MountableFileSystem.Create()
: The new way of instantiating theMountableFileSystem
takes in a mount map:BrowserFS.FileSystem.MountableFileSystem.Create({ '/tmp': inMemory }, function(e, fs) {})
-
-
Deprecated methods: Deprecates awkward initialization phases from file systems and constructors that require callbacks.
-
new BrowserFS.FileSystem.AsyncMirror(sync, async)
: UseBrowserFS.FileSystem.AsyncMirror.Create({ sync: sync, async: async }, function (e, fs) {})
instead. -
AsyncMirror.initialize()
: UseAsyncMirror.Create
, which handles initialization for you. -
new BrowserFS.FileSystem.Dropbox(client)
: UseBrowserFS.FileSystem.Dropbox.Create({client: client}, function (e, fs) {})
instead. -
new BrowserFS.FileSystem.HTML5FS(size, type)
: UseBrowserFS.FileSystem.HTML5FS.Create({ type: type, size: size }, function (e, fs) {})
instead. -
HTML5FS.allocate()
: UseHTML5FS.Create()
instead, which handles allocation for you. -
new BrowserFS.FileSystem.IndexedDB(storeName)
: UseBrowserFS.FileSystem.IndexedDB({ storeName: storeName }, function(e, fs) { })
instead. -
new BrowserFS.FileSystem.IsoFS(data, name)
: UseBrowserFS.FileSystem.IsoFS({ data: data, name: name}, function(e, fs) {})
instead. -
new BrowserFS.FileSystem.OverlayFS(writable, readable)
: UseBrowerFS.FileSystem.OverlayFS({ readable: readable, writable: writable }, function (e, fs) {})
instead. -
OverlayFS.initialize()
: UseOverlayFS.Create()
instead, which initializes OverlayFS for you! -
new BrowserFS.FileSystem.WorkerFS(worker)
: UseBrowserFS.FileSystem.WorkerFS({ worker: worker }, function (e, cb){})
instead. -
new BrowserFS.FileSystem.XmlHttpRequest(index, baseUrl)
: UseBrowserFS.FileSystem.XmlHttpRequest.Create({ index: index, baseUrl: baseUrl})
instead. -
XmlHttpRequest.FromUrl
: UseXmlHttpRequest.Create()
instead, which handles index URLs asynchronously. -
new BrowserFS.FileSystem.ZipFS(zipData, name)
: UseBrowserFS.FileSystem.ZipFS.Create({ zipData: zipData, name: name }, function (e, fs) {})
instead. -
ZipFS.computeIndex()
: UseZipFS.Create()
instead, which already computes indexes responsively.
-
1、 browserfs.js 809.9KB
2、 browserfs.js.map 1.18MB
3、 browserfs.min.js 238.78KB
4、 browserfs.min.js.map 1.94MB