152a38012Sejakowatz //---------------------------------------------------------------------- 252a38012Sejakowatz // This software is part of the OpenBeOS distribution and is covered 352a38012Sejakowatz // by the OpenBeOS license. 452a38012Sejakowatz //--------------------------------------------------------------------- 552a38012Sejakowatz /*! 652a38012Sejakowatz \file storage_support.h 752a38012Sejakowatz Interface declarations for miscellaneous internal 852a38012Sejakowatz Storage Kit support functions. 952a38012Sejakowatz */ 1052a38012Sejakowatz 1182b75665STyler Dauwalder #ifndef _STORAGE_SUPPORT_H 1282b75665STyler Dauwalder #define _STORAGE_SUPPORT_H 1352a38012Sejakowatz 1452a38012Sejakowatz 15*09d84e61STyler Dauwalder namespace BPrivate { 16*09d84e61STyler Dauwalder namespace Storage { 1752a38012Sejakowatz 1852a38012Sejakowatz //! Returns whether the supplied path is absolute. 1952a38012Sejakowatz bool is_absolute_path(const char *path); 2052a38012Sejakowatz 2152a38012Sejakowatz //! splits a path name into directory path and leaf name 2252a38012Sejakowatz status_t split_path(const char *fullPath, char *&path, char *&leaf); 2352a38012Sejakowatz 2452a38012Sejakowatz //! splits a path name into directory path and leaf name 2552a38012Sejakowatz status_t split_path(const char *fullPath, char **path, char **leaf); 2652a38012Sejakowatz 2752a38012Sejakowatz //! Parses the first component of a path name. 2852a38012Sejakowatz status_t parse_first_path_component(const char *path, int32& length, 2952a38012Sejakowatz int32& nextComponent); 3052a38012Sejakowatz 3152a38012Sejakowatz //! Parses the first component of a path name. 3252a38012Sejakowatz status_t parse_first_path_component(const char *path, char *&component, 3352a38012Sejakowatz int32& nextComponent); 3452a38012Sejakowatz 3552a38012Sejakowatz //! Checks whether an entry name is a valid entry name. 3652a38012Sejakowatz status_t check_entry_name(const char *entry); 3752a38012Sejakowatz 3852a38012Sejakowatz //! Checks whether a path name is a valid path name. 3952a38012Sejakowatz status_t check_path_name(const char *path); 4052a38012Sejakowatz 41*09d84e61STyler Dauwalder }; // namespace Storage 42*09d84e61STyler Dauwalder }; // namespace BPrivate 4352a38012Sejakowatz 4482b75665STyler Dauwalder #endif // _STORAGE_SUPPORT_H 45*09d84e61STyler Dauwalder 46*09d84e61STyler Dauwalder 47