export abstract class FileSystem { abstract readonly root : string ; abstract readonly sep : string ; abstract readonly type : "zip" | "path" ; abstract readonly writeable : boolean ; abstract join ( ... paths ) ; abstract isDirectory ( name ) ; abstract existsFile ( name ) ; abstract readFile ( name , encoding ) ; abstract readFile ( name , encoding ) ; abstract readFile ( name ) ; abstract readFile ( name , encoding ? ) ; /**
     * Get the url for a file entry. If the system does not support get url. This should return an empty string.
     */ getUrl ( name ) { return "" ; } abstract listFiles ( name ) ; abstract cd ( name ) ; close ( ) { } async missingFile ( name ) { return this . existsFile ( name ) . then ( ( v ) => ! v ) ; } async walkFiles ( target , walker ) { if ( await this . isDirectory ( target ) ) { const childs = await this . listFiles ( target ) ; for ( const child of childs ) { await this . walkFiles ( this . join ( target , child ) , walker ) ; } } else { const result = walker ( this . join ( target ) ) ; if ( result instanceof Promise ) { await result ; } } } }