本文整理汇总了TypeScript中fs-extra.ensureSymlink函数的典型用法代码示例。如果您正苦于以下问题:TypeScript ensureSymlink函数的具体用法?TypeScript ensureSymlink怎么用?TypeScript ensureSymlink使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了ensureSymlink函数的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1:
fs.ensureDir(path, ensureNum, errorCallback);
fs.ensureDirSync(path);
fs.ensureDirSync(path, ensureObj);
fs.ensureDirSync(path, ensureNum);
fs.ensureFile(path).then(() => {
// stub
});
fs.ensureFile(path, errorCallback);
fs.ensureFileSync(path);
fs.ensureLink(path, path).then(() => {
// stub
});
fs.ensureLink(path, path, errorCallback);
fs.ensureLinkSync(path, path);
fs.ensureSymlink(path, path, "file").then(() => {
// stub
});
fs.ensureSymlink(path, path, errorCallback);
fs.ensureSymlinkSync(path, path);
fs.emptyDir(path).then(() => {
// stub
});
fs.emptyDir(path, errorCallback);
fs.emptyDirSync(path);
fs.pathExists(path).then((_exist: boolean) => {
// stub
});
fs.pathExists(path, (_err: Error, _exists: boolean) => { });
const x: boolean = fs.pathExistsSync(path);
示例2:
// stub
});
fs.ensureDir(path, errorCallback);
fs.ensureDirSync(path);
fs.ensureFile(path).then(() => {
// stub
});
fs.ensureFile(path, errorCallback);
fs.ensureFileSync(path);
fs.ensureLink(path).then(() => {
// stub
});
fs.ensureLink(path, errorCallback);
fs.ensureLinkSync(path);
fs.ensureSymlink(path).then(() => {
// stub
});
fs.ensureSymlink(path, errorCallback);
fs.ensureSymlinkSync(path);
fs.emptyDir(path).then(() => {
// stub
});
fs.emptyDir(path, errorCallback);
fs.emptyDirSync(path);
fs.pathExists(path).then((_exist: boolean) => {
// stub
});
fs.pathExists(path, (_err: Error, _exists: boolean) => { });
const x: boolean = fs.pathExistsSync(path);
示例3:
fs.readJson(file, (error: Error, jsonObject: any) => {});
fs.readJson(file, readOptions, (error: Error, jsonObject: any) => {});
fs.readJSON(file, (error: Error, jsonObject: any) => {});
fs.readJSON(file, readOptions, (error: Error, jsonObject: any) => {});
fs.readJsonSync(file, readOptions);
fs.readJSONSync(file, readOptions);
fs.remove(dir, errorCallback);
fs.removeSync(dir);
fs.writeJson(file, object, errorCallback);
fs.writeJson(file, object, writeOptions, errorCallback);
fs.writeJSON(file, object, errorCallback);
fs.writeJSON(file, object, writeOptions, errorCallback);
fs.writeJsonSync(file, object, writeOptions);
fs.writeJSONSync(file, object, writeOptions);
fs.ensureDir(path, errorCallback);
fs.ensureDirSync(path);
fs.ensureFile(path, errorCallback);
fs.ensureFileSync(path);
fs.ensureLink(path, errorCallback);
fs.ensureLinkSync(path);
fs.ensureSymlink(path, errorCallback);
fs.ensureSymlinkSync(path);
fs.emptyDir(path, errorCallback);
fs.emptyDirSync(path);