Skip to content

Commit ecef48e

Browse files
committed
drop 'async' from DefaultBackend methods that don't need it
1 parent 797d239 commit ecef48e

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

src/DefaultBackend.js

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ module.exports = class DefaultBackend {
8282
await this._idb.saveSuperblock(this._cache._root);
8383
}
8484
}
85-
async _writeStat(filepath, size, opts) {
85+
_writeStat(filepath, size, opts) {
8686
let dirparts = path.split(path.dirname(filepath))
8787
let dir = dirparts.shift()
8888
for (let dirpart of dirparts) {
@@ -141,40 +141,40 @@ module.exports = class DefaultBackend {
141141
await this._idb.unlink(stat.ino)
142142
}
143143
}
144-
async readdir(filepath, opts) {
144+
readdir(filepath, opts) {
145145
return this._cache.readdir(filepath);
146146
}
147-
async mkdir(filepath, opts) {
147+
mkdir(filepath, opts) {
148148
const { mode = 0o777 } = opts;
149-
await this._cache.mkdir(filepath, { mode });
149+
this._cache.mkdir(filepath, { mode });
150150
}
151-
async rmdir(filepath, opts) {
151+
rmdir(filepath, opts) {
152152
// Never allow deleting the root directory.
153153
if (filepath === "/") {
154154
throw new ENOTEMPTY();
155155
}
156156
this._cache.rmdir(filepath);
157157
}
158-
async rename(oldFilepath, newFilepath) {
158+
rename(oldFilepath, newFilepath) {
159159
this._cache.rename(oldFilepath, newFilepath);
160160
}
161-
async stat(filepath, opts) {
161+
stat(filepath, opts) {
162162
return this._cache.stat(filepath);
163163
}
164-
async lstat(filepath, opts) {
164+
lstat(filepath, opts) {
165165
return this._cache.lstat(filepath);
166166
}
167-
async readlink(filepath, opts) {
167+
readlink(filepath, opts) {
168168
return this._cache.readlink(filepath);
169169
}
170-
async symlink(target, filepath) {
170+
symlink(target, filepath) {
171171
this._cache.symlink(target, filepath);
172172
}
173173
async backFile(filepath, opts) {
174174
let size = await this._http.sizeFile(filepath)
175175
await this._writeStat(filepath, size, opts)
176176
}
177-
async du(filepath) {
177+
du(filepath) {
178178
return this._cache.du(filepath);
179179
}
180180
}

0 commit comments

Comments
 (0)