Class LocalFilesystem

A Filesystem implementation that stores files on the local disk.

Todo

walk

Hierarchy

Constructors

Properties

Methods

  • Protected

    Given a relative path in the store, resolve it to an absolute path to the metadata JSON file for that path.

    Parameters

    • storePath: string

    Returns string

  • Protected

    Normalize the input tags into a single array of strings. This is useful for implementing the fluent interface for putLocalFile().

    Example

    const tags: string[] = this._normalizeTags(args.tag, args.tags)
    

    Parameters

    • Optional tag: string
    • Optional tags: string[]

    Returns string[]

  • Store a file from the local filesystem into the remote filesystem.

    Example

    await store.putLocalFile({
    localPath: '/tmp/temp.file',
    storePath: 'my/upload-key/temp.file',
    mimeType: 'application/json',
    tags: ['json', 'user-data'],
    })

    Parameters

    • __namedParameters: {
          localPath: string;
          mimeType?: string;
          storePath: string;
          tag?: string;
          tags?: string[];
      }
      • localPath: string
      • Optional mimeType?: string
      • storePath: string
      • Optional tag?: string
      • Optional tags?: string[]

    Returns Promise<void>

  • Remove the given resource(s) from the remote filesystem.

    Parameters

    • args: {
          recursive?: boolean;
          storePath: string;
      }
      • Optional recursive?: boolean
      • storePath: string

    Returns Promise<void>

  • Fetch some information about a file that may or may not be in the remote filesystem without fetching the entire file.

    Parameters

    • args: {
          storePath: string;
      }
      • storePath: string

    Returns Promise<Stat>

  • If the file does not exist in the remote filesystem, create it. If it does exist, update the modify timestamps.

    Parameters

    • args: {
          storePath: string;
      }
      • storePath: string

    Returns Promise<void>