mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-30 01:04:49 -05:00
Trim unused functionality
This commit is contained in:
1434
src/harness/vfs.ts
1434
src/harness/vfs.ts
File diff suppressed because it is too large
Load Diff
@@ -148,7 +148,7 @@ namespace vfsutils {
|
||||
}
|
||||
for (const document of documents) {
|
||||
fs.mkdirpSync(vpath.dirname(document.file));
|
||||
fs.writeFileSync(document.file, document.text, { encoding: "utf8", flag: options && options.overwrite ? "w" : "wx" });
|
||||
fs.writeFileSync(document.file, document.text, "utf8");
|
||||
fs.filemeta(document.file).set("document", document);
|
||||
// Add symlinks
|
||||
const symlink = document.meta.get("symlink");
|
||||
|
||||
@@ -53,7 +53,7 @@ namespace vpath {
|
||||
export function validate(path: string, flags: ValidationFlags = ValidationFlags.RelativeOrAbsolute) {
|
||||
const components = parse(path);
|
||||
const trailing = hasTrailingSeparator(path);
|
||||
if (!validateComponents(components, flags, trailing)) throw new vfs.IOError("ENOENT", "scandir", path);
|
||||
if (!validateComponents(components, flags, trailing)) throw new vfs.IOError("ENOENT");
|
||||
return components.length > 1 && trailing ? format(reduce(components)) + sep : format(reduce(components));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user