Spaces:
Paused
Paused
Download node_modules/@huggingface/hub/dist/src/lib/cache-management.d.ts from ken-q/opencode-home: direct link, hf CLI and curl.
- Browser
- Download file 1.63 kB
-
https://huggingface.co/spaces/ken-q/opencode-home/resolve/main/node_modules/%40huggingface/hub/dist/src/lib/cache-management.d.ts
- Command line
-
hf download hf://spaces/ken-q/opencode-home/node_modules/@huggingface/hub/dist/src/lib/cache-management.d.ts
-
curl -L -o cache-management.d.ts https://huggingface.co/spaces/ken-q/opencode-home/resolve/main/node_modules/%40huggingface/hub/dist/src/lib/cache-management.d.ts
1.63 kB
| import type { Stats } from "node:fs"; | |
| import type { RepoType, RepoId } from "../types/public"; | |
| export declare function getHFHubCachePath(): string; | |
| export declare const REPO_ID_SEPARATOR: string; | |
| export declare function getRepoFolderName({ name, type }: RepoId): string; | |
| export interface CachedFileInfo { | |
| path: string; | |
| /** | |
| * Underlying file - which `path` is symlinked to | |
| */ | |
| blob: { | |
| size: number; | |
| path: string; | |
| lastModifiedAt: Date; | |
| lastAccessedAt: Date; | |
| }; | |
| } | |
| export interface CachedRevisionInfo { | |
| commitOid: string; | |
| path: string; | |
| size: number; | |
| files: CachedFileInfo[]; | |
| refs: string[]; | |
| lastModifiedAt: Date; | |
| } | |
| export interface CachedRepoInfo { | |
| id: RepoId; | |
| path: string; | |
| size: number; | |
| filesCount: number; | |
| revisions: CachedRevisionInfo[]; | |
| lastAccessedAt: Date; | |
| lastModifiedAt: Date; | |
| } | |
| export interface HFCacheInfo { | |
| size: number; | |
| repos: CachedRepoInfo[]; | |
| warnings: Error[]; | |
| } | |
| export declare function scanCacheDir(cacheDir?: string | undefined): Promise<HFCacheInfo>; | |
| export declare function scanCachedRepo(repoPath: string): Promise<CachedRepoInfo>; | |
| export declare function scanRefsDir(refsPath: string, refsByHash: Map<string, string[]>): Promise<void>; | |
| export declare function scanSnapshotDir(revisionPath: string, cachedFiles: CachedFileInfo[], blobStats: Map<string, Stats>): Promise<void>; | |
| export declare function getBlobStat(blobPath: string, blobStats: Map<string, Stats>): Promise<Stats>; | |
| export declare function parseRepoType(type: string): RepoType; | |
| //# sourceMappingURL=cache-management.d.ts.map |