riot_sys

Function vfs_normalize_path

Source
pub unsafe extern "C" fn vfs_normalize_path(
    buf: *mut c_char,
    path: *const c_char,
    buflen: size_t,
) -> c_int
Expand description

@brief Normalize a path

Normalizing a path means to remove all relative components (“..”, “.”) and any double slashes.

@note @p buf is allowed to overlap @p path if @p &buf[0] <= @p &path[0]

@attention @p path must be an absolute path (starting with @c / )

@param[out] buf buffer to store normalized path @param[in] path path to normalize @param[in] buflen available space in @p buf

@return number of path components in the normalized path on success @return <0 on error