Skip to content
This repository has been archived by the owner on Jul 27, 2023. It is now read-only.

fox-finder/FoxBase

Repository files navigation

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

Releases

No releases published

Packages

No packages published