blob: 1cc64c74cd005807fec8ebae2bb3d6ecf68ee1b1 [file] [log] [blame]
Peter A. Bigot312f05e2019-07-21 17:06:54 -05001/*
2 * Copyright (c) 2019 Peter Bigot Consulting, LLC
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
7/* Utility functions for use by filesystem implementations. */
8
9#ifndef ZEPHYR_SUBSYS_FS_FS_IMPL_H_
10#define ZEPHYR_SUBSYS_FS_FS_IMPL_H_
11
Kumar Galaf4edd472019-12-09 11:41:46 -060012#include <fs/fs.h>
Peter A. Bigot312f05e2019-07-21 17:06:54 -050013
14#ifdef __cplusplus
15extern "C" {
16#endif
17
18/**
19 * @brief Strip the mount point prefix from a path.
20 *
21 * @param path an absolute path beginning with a mount point.
22 *
23 * @param mp a pointer to the mount point within which @p path is found
24 *
25 * @return the absolute path within the mount point. Behavior is
26 * undefined if @p path does not start with the mount point prefix.
27 */
28const char *fs_impl_strip_prefix(const char *path,
29 const struct fs_mount_t *mp);
30
31
32#ifdef __cplusplus
33}
34#endif
35
36#endif /* ZEPHYR_SUBSYS_FS_FS_IMPL_H_ */