import * as Stream from 'stream'; import { Metadata, File, StreamFile, Visibility } from '..'; declare interface IAdapter { //////////////// // PROPERTIES // //////////////// targetVersion: string; ////////////////// // READ METHODS // ////////////////// /** * Check whether a file exists. */ exists(path: string): Promise; /** * Read a file. */ read(path: string): Promise; /** * Read a file as a stream. */ readStream(path: string): Promise; /** * Get all the meta data of a file or directory. */ getMetadata(path: string): Promise; /** * Get the visibility of a file. */ getVisibility(path: string): Promise; /////////////////// // WRITE METHODS // /////////////////// /** * Write a file. */ write(path: string, contents: string, options?: { visibility?: Visibility }): Promise; /** * Write a file using a stream. */ writeStream(path: string, stream: Stream, options?: { visibility?: Visibility }): Promise; /** * Rename a file. */ move(oldPath: string, newPath: string): Promise; /** * Copy a file. */ copy(oldPath: string, clonedPath: string): Promise; /** * Delete a file. */ delete(path: string): Promise; /** * Delete a directory. */ deleteDir(path: string): Promise; /** * Create a directory. */ createDir(path: string): Promise; /** * Set the visibility for a file. */ setVisibility(path: string, visibility: Visibility): Promise; } export default IAdapter;