Home Explore Blog CI



neovim

43th chunk of `runtime/doc/luvref.txt`
3846bd95efb692c3a59a91633569083c8d22338687223fe80000000100000fa9
 `mtime`: `number` or `string` or `nil`
                - `callback`: `callable` (async version) or `nil` (sync
                  version)
                  - `err`: `nil` or `string`
                  - `success`: `boolean` or `nil`

                Equivalent to `futimes(3)`.

                See |luv-constants| for supported FS Modification Time
                constants.

                Passing `"now"` or `uv.constants.FS_UTIME_NOW` as the atime or
                mtime sets the timestamp to the current time.

                Passing `nil`, `"omit"`, or `uv.constants.FS_UTIME_OMIT` as
                the atime or mtime leaves the timestamp untouched.

                Returns (sync version): `boolean` or `fail`

                Returns (async version): `uv_fs_t userdata`

uv.fs_lutime({path} [, {atime}, {mtime}, {callback}])           *uv.fs_lutime()*

                Parameters:
                - `path`: `string`
                - `atime`: `number` or `string` or `nil`
                - `mtime`: `number` or `string` or `nil`
                - `callback`: `callable` (async version) or `nil` (sync
                  version)
                  - `err`: `nil` or `string`
                  - `success`: `boolean` or `nil`

                Equivalent to `lutimes(3)`.

                See |luv-constants| for supported FS Modification Time
                constants.

                Passing `"now"` or `uv.constants.FS_UTIME_NOW` as the atime or
                mtime sets the timestamp to the current time.

                Passing `nil`, `"omit"`, or `uv.constants.FS_UTIME_OMIT` as
                the atime or mtime leaves the timestamp untouched.

                Returns (sync version): `boolean` or `fail`

                Returns (async version): `uv_fs_t userdata`

uv.fs_link({path}, {new_path} [, {callback}])                     *uv.fs_link()*

                Parameters:
                - `path`: `string`
                - `new_path`: `string`
                - `callback`: `callable` (async version) or `nil` (sync
                  version)
                  - `err`: `nil` or `string`
                  - `success`: `boolean` or `nil`

                Equivalent to `link(2)`.

                Returns (sync version): `boolean` or `fail`

                Returns (async version): `uv_fs_t userdata`

uv.fs_symlink({path}, {new_path} [, {flags} [, {callback}]])   *uv.fs_symlink()*

                Parameters:
                - `path`: `string`
                - `new_path`: `string`
                - `flags`: `table`, `integer`, or `nil`
                  - `dir`: `boolean`
                  - `junction`: `boolean`
                - `callback`: `callable` (async version) or `nil` (sync
                  version)
                  - `err`: `nil` or `string`
                  - `success`: `boolean` or `nil`

                Equivalent to `symlink(2)`. If the `flags` parameter is
                omitted, then the 3rd parameter will be treated as the
                `callback`.

                Returns (sync version): `boolean` or `fail`

                Returns (async version): `uv_fs_t userdata`

uv.fs_readlink({path} [, {callback}])                         *uv.fs_readlink()*

                Parameters:
                - `path`: `string`
                - `callback`: `callable` (async version) or `nil` (sync
                  version)
                  - `err`: `nil` or `string`
                  - `path`: `string` or `nil`

                Equivalent to `readlink(2)`.

                Returns (sync version): `string` or `fail`

                Returns (async version): `uv_fs_t userdata`

uv.fs_realpath({path} [, {callback}])                         *uv.fs_realpath()*

                Parameters:
                - `path`: `string`
                - `callback`: `callable` (async version) or `nil` (sync
                  version)
                  - `err`: `nil` or `string`
                  - `path`: `string` or `nil`

                Equivalent

Title: File System Operations: Lutime, Link, Symlink, Readlink, Realpath
Summary
This section documents several file system operations within libuv, including: `uv.fs_lutime()` (change access and modification times of a symbolic link), `uv.fs_link()` (create a hard link), `uv.fs_symlink()` (create a symbolic link), `uv.fs_readlink()` (read the target of a symbolic link), and `uv.fs_realpath()` (return the canonicalized absolute pathname). It details function parameters, return values for both synchronous and asynchronous versions, and their corresponding POSIX equivalents (e.g., `lutimes(3)`, `link(2)`, `symlink(2)`, `readlink(2)`). Special attention is given to the flags parameter of `uv.fs_symlink()` which can be used to specify directory or junction symlink types.