mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-17 09:35:37 -05:00
* initial * cleanup * Add typings ref * fix compile * remove unused * add missing * another unused * Use newer vscodetestcover * newer dataprotocol * format * cleanup ignores * fix out path * fix entry point * more cleanup * Move into src folder * Handle service client log messages * remove unused
24 lines
933 B
TypeScript
24 lines
933 B
TypeScript
/*---------------------------------------------------------------------------------------------
|
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
|
*--------------------------------------------------------------------------------------------*/
|
|
|
|
import * as fs from 'fs';
|
|
|
|
export interface IFile {
|
|
path: string;
|
|
isDirectory: boolean;
|
|
}
|
|
|
|
export interface IFileSource {
|
|
|
|
enumerateFiles(path: string): Promise<IFile[]>;
|
|
mkdir(dirName: string, remoteBasePath: string): Promise<void>;
|
|
createReadStream(path: string): fs.ReadStream;
|
|
readFile(path: string, maxBytes?: number): Promise<Buffer>;
|
|
readFileLines(path: string, maxLines: number): Promise<Buffer>;
|
|
writeFile(localFile: IFile, remoteDir: string): Promise<string>;
|
|
delete(path: string, recursive?: boolean): Promise<void>;
|
|
exists(path: string): Promise<boolean>;
|
|
}
|