- `err`: `nil` or `string`
- `success`: `boolean` or `nil`
Equivalent to `mkdir(2)`.
Returns (sync version): `boolean` or `fail`
Returns (async version): `uv_fs_t userdata`
uv.fs_mkdtemp({template} [, {callback}]) *uv.fs_mkdtemp()*
Parameters:
- `template`: `string`
- `callback`: `callable` (async version) or `nil` (sync
version)
- `err`: `nil` or `string`
- `path`: `string` or `nil`
Equivalent to `mkdtemp(3)`.
Returns (sync version): `string` or `fail`
Returns (async version): `uv_fs_t userdata`
uv.fs_mkstemp({template} [, {callback}]) *uv.fs_mkstemp()*
Parameters:
- `template`: `string`
- `callback`: `callable` (async version) or `nil` (sync
version)
- `err`: `nil` or `string`
- `fd`: `integer` or `nil`
- `path`: `string` or `nil`
Equivalent to `mkstemp(3)`. Returns a temporary file handle
and filename.
Returns (sync version): `integer, string` or `fail`
Returns (async version): `uv_fs_t userdata`
uv.fs_rmdir({path} [, {callback}]) *uv.fs_rmdir()*
Parameters:
- `path`: `string`
- `callback`: `callable` (async version) or `nil` (sync
version)
- `err`: `nil` or `string`
- `success`: `boolean` or `nil`
Equivalent to `rmdir(2)`.
Returns (sync version): `boolean` or `fail`
Returns (async version): `uv_fs_t userdata`
uv.fs_scandir({path} [, {callback}]) *uv.fs_scandir()*
Parameters:
- `path`: `string`
- `callback`: `callable`
- `err`: `nil` or `string`
- `success`: `uv_fs_t userdata` or `nil`
Equivalent to `scandir(3)`, with a slightly different API.
Returns a handle that the user can pass to
|uv.fs_scandir_next()|.
Note: This function can be used synchronously or
asynchronously. The request userdata is always synchronously
returned regardless of whether a callback is provided and the
same userdata is passed to the callback if it is provided.
Returns: `uv_fs_t userdata` or `fail`
uv.fs_scandir_next({fs}) *uv.fs_scandir_next()*
Parameters:
- `fs`: `uv_fs_t userdata`
Called on a |uv_fs_t| returned by |uv.fs_scandir()| to get the
next directory entry data as a `name, type` pair. When there
are no more entries, `nil` is returned.
Note: This function only has a synchronous version. See
|uv.fs_opendir()| and its related functions for an
asynchronous version.
Returns: `string, string` or `nil` or `fail`
uv.fs_stat({path} [, {callback}]) *uv.fs_stat()*
Parameters:
- `path`: `string`
- `callback`: `callable` (async version) or `nil` (sync
version)
- `err`: `nil` or `string`
- `stat`: `table` or `nil` (see below)
Equivalent to `stat(2)`.
Returns (sync version): `table` or `fail`
- `dev` : `integer`
- `mode` : `integer`
- `nlink` : `integer`
- `uid` : `integer`
- `gid` : `integer`
- `rdev` : `integer`
- `ino` : `integer`