template-saas/apps/backend/node_modules/check-disk-space/dist/check-disk-space.d.ts
rckrdmrd 26f0e52ca7 feat: Initial commit - template-saas
Template base para proyectos SaaS multi-tenant.

Estructura inicial:
- apps/backend (NestJS API)
- apps/frontend (React/Vite)
- apps/database (PostgreSQL DDL)
- docs/ (Documentación)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-07 04:41:24 -06:00

54 lines
1.4 KiB
TypeScript

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 };