Remove unnecessary context storage APIs

and rename context storage APIs
This commit is contained in:
HirokiUchikawa
2018-06-20 20:00:39 +09:00
parent dd81d947fc
commit e6411d11b1
5 changed files with 182 additions and 194 deletions

View File

@@ -86,7 +86,7 @@ LocalFileSystem.prototype.close = function(){
return Promise.resolve();
}
LocalFileSystem.prototype.getAsync = function(scope, key) {
LocalFileSystem.prototype.get = function(scope, key) {
var storagePath = getStoragePath(this.storageBaseDir ,scope);
return loadFile(storagePath + ".json").then(function(data){
if(data){
@@ -99,7 +99,7 @@ LocalFileSystem.prototype.getAsync = function(scope, key) {
});
};
LocalFileSystem.prototype.setAsync =function(scope, key, value) {
LocalFileSystem.prototype.set =function(scope, key, value) {
var storagePath = getStoragePath(this.storageBaseDir ,scope);
return loadFile(storagePath + ".json").then(function(data){
var obj = data ? JSON.parse(data) : {}
@@ -113,7 +113,7 @@ LocalFileSystem.prototype.setAsync =function(scope, key, value) {
});
};
LocalFileSystem.prototype.keysAsync = function(scope){
LocalFileSystem.prototype.keys = function(scope){
var storagePath = getStoragePath(this.storageBaseDir ,scope);
return loadFile(storagePath + ".json").then(function(data){
if(data){