UNPKG

1.59 kBTypeScriptView Raw
1/// <reference types="node" />
2import * as fs from "fs";
3import { Exception } from '@microsoft.azure/tasks';
4export declare class PathNotFoundException extends Exception {
5 exitCode: number;
6 constructor(path: string, exitCode?: number);
7}
8export declare class PathIsNotFileException extends Exception {
9 exitCode: number;
10 constructor(path: string, exitCode?: number);
11}
12export declare class PathIsNotDirectoryException extends Exception {
13 exitCode: number;
14 constructor(path: string, exitCode?: number);
15}
16export declare class UnableToRemoveException extends Exception {
17 exitCode: number;
18 constructor(path: string, exitCode?: number);
19}
20export declare class UnableToMakeDirectoryException extends Exception {
21 exitCode: number;
22 constructor(path: string, exitCode?: number);
23}
24export declare const exists: (path: string | Buffer) => Promise<boolean>;
25export declare const readdir: (path: string | Buffer) => Promise<Array<string>>;
26export declare const close: (fd: number) => Promise<void>;
27export declare const writeFile: (filename: string, content: string) => Promise<void>;
28export declare const lstat: (path: string | Buffer) => Promise<fs.Stats>;
29export declare function mkdir(dirPath: string): Promise<void>;
30export declare function readFile(filename: string): Promise<string>;
31export declare function isDirectory(dirPath: string): Promise<boolean>;
32export declare function isFile(filePath: string): Promise<boolean>;
33export declare function rmdir(dirPath: string): Promise<void>;
34export declare function rmFile(filePath: string): Promise<void>;