Huggingface.js documentation
Interface: CommitCopyFile
Interface: CommitCopyFile
Server-side copy of a file from a source repo/bucket to the destination repo.
Only supported when the destination repo is a bucket. The source file must be xet-backed, so the caller is responsible for resolving the source path to its sourceXetHash (typically via pathsInfo or listFiles).
For higher-level helpers that perform the resolution and handle non-xet source files, see copyFile, copyFiles and copyFolder.
Properties
mode
• Optional mode: number
POSIX file mode (st_mode), e.g. 0o755, optionally with file type bits 0o100000 (regular file)
or 0o120000 (symlink, content is the link target).
Only supported for buckets, ignored otherwise. When omitted, the file has no mode on the Hub.
Defined in
packages/hub/src/lib/commit.ts:142
operation
• operation: "copy"
Defined in
packages/hub/src/lib/commit.ts:132
path
• path: string
Defined in
packages/hub/src/lib/commit.ts:133
sourceRepo
• sourceRepo: RepoDesignation
Defined in
packages/hub/src/lib/commit.ts:135
sourceXetHash
• sourceXetHash: string
Defined in
packages/hub/src/lib/commit.ts:134
Update on GitHub