xref: /haiku/headers/private/storage/storage_support.h (revision 09d84e61b6c2629d253dce1e7d7e944943d3e40e)
1 //----------------------------------------------------------------------
2 //  This software is part of the OpenBeOS distribution and is covered
3 //  by the OpenBeOS license.
4 //---------------------------------------------------------------------
5 /*!
6 	\file storage_support.h
7 	Interface declarations for miscellaneous internal
8 	Storage Kit support functions.
9 */
10 
11 #ifndef _STORAGE_SUPPORT_H
12 #define _STORAGE_SUPPORT_H
13 
14 
15 namespace BPrivate {
16 namespace Storage {
17 
18 //! Returns whether the supplied path is absolute.
19 bool is_absolute_path(const char *path);
20 
21 //!	splits a path name into directory path and leaf name
22 status_t split_path(const char *fullPath, char *&path, char *&leaf);
23 
24 //!	splits a path name into directory path and leaf name
25 status_t split_path(const char *fullPath, char **path, char **leaf);
26 
27 //! Parses the first component of a path name.
28 status_t parse_first_path_component(const char *path, int32& length,
29 									int32& nextComponent);
30 
31 //! Parses the first component of a path name.
32 status_t parse_first_path_component(const char *path, char *&component,
33 									int32& nextComponent);
34 
35 //! Checks whether an entry name is a valid entry name.
36 status_t check_entry_name(const char *entry);
37 
38 //! Checks whether a path name is a valid path name.
39 status_t check_path_name(const char *path);
40 
41 };	// namespace Storage
42 };	// namespace BPrivate
43 
44 #endif	// _STORAGE_SUPPORT_H
45 
46 
47