mirror of
https://github.com/denoland/std.git
synced 2024-11-22 04:59:05 +00:00
refactor(mkdirp): reorg (#103)
This commit is contained in:
parent
c42686dc36
commit
41312ad39f
@ -18,7 +18,7 @@
|
||||
|
||||
A library for resolving media types (MIME types) and extensions.
|
||||
|
||||
- **[mkdirp](./mkdirp/)**
|
||||
- **[mkdirp](./fs/)**
|
||||
|
||||
Make directory branches.
|
||||
|
||||
|
@ -1,3 +1,22 @@
|
||||
/**
|
||||
* # deno-mkdirp
|
||||
*
|
||||
* `mkdir -p` 4 `deno`.
|
||||
*
|
||||
* ## Import
|
||||
*
|
||||
* ```ts
|
||||
* import { mkdirp } from "https://deno.land/x/std/fs/mkdirp.ts";
|
||||
* ```
|
||||
*
|
||||
* ## API
|
||||
*
|
||||
* Same as [`deno.mkdir`](https://deno.land/typedoc/index.html#mkdir).
|
||||
*
|
||||
* ### `mkdirp(path: string, mode?: number) : Promise<void>`
|
||||
*
|
||||
* Creates directories if they do not already exist and makes parent directories as needed.
|
||||
*/
|
||||
import { ErrorKind, FileInfo, lstat, mkdir, platform } from "deno";
|
||||
|
||||
const PATH_SEPARATOR: string = platform.os === "win" ? "\\" : "/";
|
@ -1,17 +0,0 @@
|
||||
# deno-mkdirp
|
||||
|
||||
`mkdir -p` 4 `deno`.
|
||||
|
||||
## Import
|
||||
|
||||
```ts
|
||||
import { mkdirp } from "https://deno.land/x/std/mkdirp/mkdirp.ts";
|
||||
```
|
||||
|
||||
## API
|
||||
|
||||
Same as [`deno.mkdir`](https://deno.land/typedoc/index.html#mkdir).
|
||||
|
||||
### `mkdirp(path: string, mode?: number) : Promise<void>`
|
||||
|
||||
Creates directories if they do not already exist and makes parent directories as needed.
|
2
test.ts
2
test.ts
@ -7,10 +7,10 @@ import "examples/test.ts";
|
||||
import "flags/test.ts";
|
||||
import "logging/test.ts";
|
||||
import "media_types/test.ts";
|
||||
import "mkdirp/test.ts";
|
||||
import "net/bufio_test.ts";
|
||||
import "net/http_test.ts";
|
||||
import "net/textproto_test.ts";
|
||||
import "fs/mkdirp_test.ts";
|
||||
import "fs/path/basename_test.ts";
|
||||
import "fs/path/dirname_test.ts";
|
||||
import "fs/path/extname_test.ts";
|
||||
|
Loading…
Reference in New Issue
Block a user