snowflake-sdk
Version:
Node.js driver for Snowflake
64 lines (63 loc) • 2.22 kB
TypeScript
export function globToRegex(pattern: any): RegExp;
export function getMatchingFilePaths(dir: any, fileName: any): string[];
export function validateNoExtraPermissionsForOthers(filePath: any, fsPromises?: null, useSync?: boolean): Promise<void> | void;
export function validateNoExtraPermissionsForOthersSync(filePath: any): void | Promise<void>;
export function getSecureHandle(filePath: any, flags: any, fsPromises: any): Promise<FileHandle>;
export function closeHandle(fileHandle: any): Promise<void>;
export function isFileModeCorrect(filePath: any, expectedMode: any, fsPromises: any): Promise<boolean>;
export function generateChecksum(text: any, algorithm: any, encoding: any): Promise<string>;
export function IsFileExisted(filePath: any): Promise<boolean>;
export namespace resultStatus {
let ERROR: string;
let UPLOADED: string;
let DOWNLOADED: string;
let COLLISION: string;
let SKIPPED: string;
let RENEW_TOKEN: string;
let RENEW_PRESIGNED_URL: string;
let NOT_FOUND_FILE: string;
let NEED_RETRY: string;
let NEED_RETRY_WITH_LOWER_CONCURRENCY: string;
}
export function FileHeader(digest: any, contentLength: any, encryptionMetadata: any): {
digest: any;
contentLength: any;
encryptionMetadata: any;
};
/**
* Creates a file utility object.
*
* @returns {Object}
* @constructor
*/
export function FileUtil(): Object;
export class FileUtil {
/**
* Compress file with GZIP.
*
* @param {String} fileName
* @param {String} tmpDir
*
* @returns {Object}
*/
compressFileWithGZIP: (fileName: string, tmpDir: string) => Object;
/**
* Normalize the header by removing the timestamp.
* Note: GZIP in python includes the file name when compressing but
* nodejs does not so there is no need to remove it here.
*
* @param {String} gzipFileName
*
* @returns {null}
*/
normalizeGzipHeader: (gzipFileName: string) => null;
/**
* Get file digest and size.
*
* @param {String} fileName
*
* @returns {Object}
*/
getDigestAndSizeForFile: (fileName: string) => Object;
}
export function shouldSkipTokenFilePermissionsVerification(): boolean;