}
function setVirtualPath(name, path, type, state) {
- initCache();
- cacheVirtualToReal[name] = { path: path, label: name, type: type, state: state };
+ initCache();
+ cacheVirtualToReal[name] = { path: path, label: name, type: type, state: state };
}
function mergeMultipleSlashes(str) {
getStorage: getStorage,
getAllStorages: getAllStorages,
mergeMultipleSlashes: mergeMultipleSlashes,
- setVirtualPath : setVirtualPath
+ setVirtualPath: setVirtualPath
};
})();
var limits = native_.getResultObject(native_.callSync('FileSystemManagerGetLimits'));
Object.defineProperties(this, {
maxNameLength: { value: limits[0], writable: false, enumerable: true },
- maxPathLength: { value: limits[1], writable: false, enumerable: true }
+ maxPathLength: { value: limits[1], writable: false, enumerable: true },
+ setVirtualPath: {
+ enumerable: false,
+ value: function(name, path, type, state) {
+ commonFS_.setVirtualPath(name, path, type, state);
+ }
+ }
});
}
removeStorageStateChangeListener.apply(this, arguments);
};
-FileSystemManager.prototype.setVirtualPath = function(name, path, type, state) {
- commonFS_.setVirtualPath(name, path, type, state);
-};
-
exports = new FileSystemManager();