xref: /haiku/headers/private/storage/storage_support.h (revision 82b7566525184ba7b76dda94b7ad469a7a65b04c)
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 StorageKit {
16 
17 //! Returns whether the supplied path is absolute.
18 bool is_absolute_path(const char *path);
19 
20 //!	splits a path name into directory path and leaf name
21 status_t split_path(const char *fullPath, char *&path, char *&leaf);
22 
23 //!	splits a path name into directory path and leaf name
24 status_t split_path(const char *fullPath, char **path, char **leaf);
25 
26 //! Parses the first component of a path name.
27 status_t parse_first_path_component(const char *path, int32& length,
28 									int32& nextComponent);
29 
30 //! Parses the first component of a path name.
31 status_t parse_first_path_component(const char *path, char *&component,
32 									int32& nextComponent);
33 
34 //! Checks whether an entry name is a valid entry name.
35 status_t check_entry_name(const char *entry);
36 
37 //! Checks whether a path name is a valid path name.
38 status_t check_path_name(const char *path);
39 
40 } // namespace StorageKit
41 
42 #endif	// _STORAGE_SUPPORT_H
43