





















11import { realpathSync } from "node:fs";
22import { isAbsolute, relative, resolve as resolvePath, sep } from "node:path";
3-import { spawnProcessSync } from "./child-process.js";
4354/**
65 * Resolve a path to its canonical (real) form, following symlinks.
@@ -56,23 +55,3 @@ export function formatPathRelativeToCwdOrAbsolute(filePath: string, cwd: string)
5655const absolutePath = resolveAgainstCwd(filePath, cwd);
5756return (getCwdRelativePath(absolutePath, cwd) ?? absolutePath).split(sep).join("/");
5857}
59-60-export function markPathIgnoredByCloudSync(path: string): void {
61-const attrs =
62-process.platform === "darwin"
63- ? ["com.dropbox.ignored", "com.apple.fileprovider.ignore#P"]
64- : process.platform === "linux"
65- ? ["user.com.dropbox.ignored"]
66- : [];
67-68-for (const attr of attrs) {
69-if (process.platform === "darwin") {
70-spawnProcessSync("xattr", ["-w", attr, "1", path], { encoding: "utf-8", stdio: "ignore" });
71-} else {
72-spawnProcessSync("setfattr", ["-n", attr, "-v", "1", path], {
73-encoding: "utf-8",
74-stdio: "ignore",
75-});
76-}
77-}
78-}
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。