Base modules for @fox-finder
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...
}