0.0.1 • Published 5 years ago
@fox-finder/base v0.0.1
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...
}
Acknowledgements
0.0.1
5 years ago