Download internal/node-utils/src/path.ts from binhugg3/admin: direct link, hf CLI and curl.
- Browser
- Download file 264 Bytes
-
https://huggingface.co/spaces/binhugg3/admin/resolve/main/internal/node-utils/src/path.ts
- Command line
-
hf download hf://spaces/binhugg3/admin/internal/node-utils/src/path.ts
-
curl -L -o path.ts https://huggingface.co/spaces/binhugg3/admin/resolve/main/internal/node-utils/src/path.ts
264 Bytes
| import { posix } from 'node:path'; | |
| /** | |
| * 将给定的文件路径转换为 POSIX 风格。 | |
| * @param {string} pathname - 原始文件路径。 | |
| */ | |
| function toPosixPath(pathname: string) { | |
| return pathname.split(`\\`).join(posix.sep); | |
| } | |
| export { toPosixPath }; | |