Permalink
Cannot retrieve contributors at this time
53 lines (46 sloc)
1.43 KB
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
codeql-action/node_modules/check-disk-space/dist/check-disk-space.d.ts
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { access } from 'node:fs/promises'; | |
import { normalize, sep } from 'node:path'; | |
declare class InvalidPathError extends Error { | |
name: string; | |
constructor(message?: string); | |
} | |
declare class NoMatchError extends Error { | |
name: string; | |
constructor(message?: string); | |
} | |
type Dependencies = { | |
platform: NodeJS.Platform; | |
release: string; | |
fsAccess: typeof access; | |
pathNormalize: typeof normalize; | |
pathSep: typeof sep; | |
cpExecFile: (file: string, args: ReadonlyArray<string> | undefined | null, options: { | |
windowsHide: true; | |
}) => Promise<{ | |
stdout: string; | |
stderr: string; | |
}>; | |
}; | |
/** | |
* Get the first existing parent path | |
* | |
* @param directoryPath - The file/folder path from where we want to know disk space | |
* @param dependencies - Dependencies container | |
*/ | |
declare function getFirstExistingParentPath(directoryPath: string, dependencies: Dependencies): Promise<string>; | |
/** | |
* `free` and `size` are in bytes | |
*/ | |
type DiskSpace = { | |
diskPath: string; | |
free: number; | |
size: number; | |
}; | |
/** | |
* Check disk space | |
* | |
* @param directoryPath - The file/folder path from where we want to know disk space | |
* @param dependencies - Dependencies container | |
*/ | |
declare function checkDiskSpace(directoryPath: string, dependencies?: Dependencies): Promise<DiskSpace>; | |
export { Dependencies, DiskSpace, InvalidPathError, NoMatchError, checkDiskSpace as default, getFirstExistingParentPath }; |