@@ -82,7 +82,7 @@ module.exports = class DefaultBackend {
82
82
await this . _idb . saveSuperblock ( this . _cache . _root ) ;
83
83
}
84
84
}
85
- async _writeStat ( filepath , size , opts ) {
85
+ _writeStat ( filepath , size , opts ) {
86
86
let dirparts = path . split ( path . dirname ( filepath ) )
87
87
let dir = dirparts . shift ( )
88
88
for ( let dirpart of dirparts ) {
@@ -141,40 +141,40 @@ module.exports = class DefaultBackend {
141
141
await this . _idb . unlink ( stat . ino )
142
142
}
143
143
}
144
- async readdir ( filepath , opts ) {
144
+ readdir ( filepath , opts ) {
145
145
return this . _cache . readdir ( filepath ) ;
146
146
}
147
- async mkdir ( filepath , opts ) {
147
+ mkdir ( filepath , opts ) {
148
148
const { mode = 0o777 } = opts ;
149
- await this . _cache . mkdir ( filepath , { mode } ) ;
149
+ this . _cache . mkdir ( filepath , { mode } ) ;
150
150
}
151
- async rmdir ( filepath , opts ) {
151
+ rmdir ( filepath , opts ) {
152
152
// Never allow deleting the root directory.
153
153
if ( filepath === "/" ) {
154
154
throw new ENOTEMPTY ( ) ;
155
155
}
156
156
this . _cache . rmdir ( filepath ) ;
157
157
}
158
- async rename ( oldFilepath , newFilepath ) {
158
+ rename ( oldFilepath , newFilepath ) {
159
159
this . _cache . rename ( oldFilepath , newFilepath ) ;
160
160
}
161
- async stat ( filepath , opts ) {
161
+ stat ( filepath , opts ) {
162
162
return this . _cache . stat ( filepath ) ;
163
163
}
164
- async lstat ( filepath , opts ) {
164
+ lstat ( filepath , opts ) {
165
165
return this . _cache . lstat ( filepath ) ;
166
166
}
167
- async readlink ( filepath , opts ) {
167
+ readlink ( filepath , opts ) {
168
168
return this . _cache . readlink ( filepath ) ;
169
169
}
170
- async symlink ( target , filepath ) {
170
+ symlink ( target , filepath ) {
171
171
this . _cache . symlink ( target , filepath ) ;
172
172
}
173
173
async backFile ( filepath , opts ) {
174
174
let size = await this . _http . sizeFile ( filepath )
175
175
await this . _writeStat ( filepath , size , opts )
176
176
}
177
- async du ( filepath ) {
177
+ du ( filepath ) {
178
178
return this . _cache . du ( filepath ) ;
179
179
}
180
180
}
0 commit comments