@@ -34,18 +34,18 @@ const ignoreEnoent = error => {
34
34
}
35
35
36
36
class PrefixWrapper {
37
- constructor ( remote , prefix ) {
37
+ constructor ( handler , prefix ) {
38
38
this . _prefix = prefix
39
- this . _remote = remote
39
+ this . _handler = handler
40
40
}
41
41
42
42
get type ( ) {
43
- return this . _remote . type
43
+ return this . _handler . type
44
44
}
45
45
46
46
// necessary to remove the prefix from the path with `prependDir` option
47
47
async list ( dir , opts ) {
48
- const entries = await this . _remote . list ( this . _resolve ( dir ) , opts )
48
+ const entries = await this . _handler . list ( this . _resolve ( dir ) , opts )
49
49
if ( opts != null && opts . prependDir ) {
50
50
const n = this . _prefix . length
51
51
entries . forEach ( ( entry , i , entries ) => {
@@ -56,7 +56,7 @@ class PrefixWrapper {
56
56
}
57
57
58
58
rename ( oldPath , newPath ) {
59
- return this . _remote . rename ( this . _resolve ( oldPath ) , this . _resolve ( newPath ) )
59
+ return this . _handler . rename ( this . _resolve ( oldPath ) , this . _resolve ( newPath ) )
60
60
}
61
61
62
62
_resolve ( path ) {
@@ -565,7 +565,7 @@ function createPrefixWrapperMethods() {
565
565
if ( arguments . length !== 0 && typeof ( path = arguments [ 0 ] ) === 'string' ) {
566
566
arguments [ 0 ] = this . _resolve ( path )
567
567
}
568
- return value.apply(this._remote , arguments)
568
+ return value.apply(this._handler , arguments)
569
569
}
570
570
571
571
defineProperty ( pPw , name , descriptor )
0 commit comments