@fox-finder/base
v0.0.1
Published
Base modules for @fox-finder
Downloads
3
Readme
FoxBase
Base modules for @fox-finder
Usage
yarn add @fox-finder/base
import MyFsService from 'my-fs-service';
import { IFile, FoxFileProvider } from '@fox-finder/base'
export class MyFileProvider implements FoxFileProvider {
constructor(options) {
this.myFsService = new MyFsService(options)
}
listFile(path: string, keyword?: string): Promise<IFile[]> {
return new Promise((resolve, reject) => {
return this.myFsService.getFileList(path, fileList => {
resolve(fileList.map(file => ({
// ...
})))
})
});
}
// other methods...
}