summaryrefslogtreecommitdiff
path: root/src/kernel/vfs/path.h
blob: 3aefccf6a596a8d8103369e1479484550f3a9665 (plain)
1
2
3
4
5
6
7
8
9
10
11
#pragma once
#include <stdbool.h>
#include <stddef.h>

/** Reduce a path to its simplest form.
 * *in and *out can't overlap unless they're equal. Then, the path is modified
 * in-place.
 *
 * @return length of the string in *out, always less than len. Negative if the path was invalid.
 */
int path_simplify(const char *in, char *out, size_t len);