SHTK_FS_NORMALIZE_PATH(3) | Library Functions Manual | SHTK_FS_NORMALIZE_PATH(3) |
shtk_fs_normalize_path
—
Returns a normalized form of a path
shtk_import fs
shtk_fs_normalize_path |
path |
The shtk_fs_normalize_path
function takes
the given path and prints its normalized form to
stdout.
This process involves the following:
Note that the normalization happens without performing any file system operations. Therefore, it is perfectly possible for two normalized paths that look different to point to the same file system entry. In particular, this is because normalization does not take into account links nor .. components.
shtk_fs_normalize_path
returns 0.
shtk_fs_normalize_path /foo/bar # Prints /foo/bar shtk_fs_normalize_path foo/bar # Prints ./foo/bar shtk_fs_normalize_path foo///bar/./baz// # Prints ./foo/bar/baz
shtk_fs_normalize_path
first appeared in
shtk
1.7.
September 18, 2016 | Debian |