Trim unused functionality

This commit is contained in:
Ron Buckton
2018-04-18 16:12:58 -07:00
parent 8b86423521
commit 1658770015
3 changed files with 493 additions and 945 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -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");

View File

@@ -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));
}