fs-extra APIs
- readFile
- existsSync
- writeFile
- pathExists
- readFileSync
- ensureDirSync
- ensureDir
- readdir
- remove
- readJson
- readdirSync
- stat
- writeFileSync
- readJSON
- copy
- readJsonSync
- writeJson
- readJSONSync
- ensureFile
- pathExistsSync
- copySync
- writeJSON
- createWriteStream
- statSync
- removeSync
- ensureFileSync
- mkdirSync
- emptyDir
- move
- unlink
- outputFile
- copyFileSync
- outputFileSync
- mkdirp
- ReadStream
- renameSync
- createFileSync
- lstatSync
- writeJSONSync
- copyFile
- open
- mkdirpSync
- close
- lstat
- outputJson
- fstat
- Stats
- rename
- read
- mkdir
- readlink
- emptydir
- createReadStream
- mkdtemp
- chmod
- FSWatcher
- Dirent
- appendFileSync
- truncateSync
- rmSync
- WriteOptions
- writeJsonSync
- rm
- unlinkSync
- SymlinkType
- mkdirs
- outputJsonSync
- emptyDirSync
- outputJSON
Other Related APIs
fs-extra#mkdir TypeScript Examples
The following examples show how to use
fs-extra#mkdir.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: generate-packages.ts From DefinitelyTyped-tools with MIT License | 6 votes |
async function writeCommonOutputs(pkg: AnyPackage, packageJson: string, readme: string): Promise<void> {
await mkdir(outputDirectory(pkg));
await Promise.all([
writeOutputFile("package.json", packageJson),
writeOutputFile("README.md", readme),
writeOutputFile("LICENSE", getLicenseFileText(pkg)),
]);
async function writeOutputFile(filename: string, content: string): Promise<void> {
await writeFile(await outputFilePath(pkg, filename), content);
}
}