Extended Append() to also allow adding parts of path components. Added leaf component manipulation. Now always chop trailing slashes off the path.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9560 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Ingo Weinhold
2004-10-28 15:09:48 +00:00
parent 53b29c4b26
commit 0402530222
2 changed files with 62 additions and 13 deletions
+7 -2
View File
@@ -22,14 +22,17 @@ public:
status_t InitCheck() const;
status_t SetPath(const char *path);
const char* Path() const;
const char *Path() const;
int32 Length() const;
int32 BufferSize() const;
char *LockBuffer();
void UnlockBuffer();
status_t Append(const char *component);
const char *Leaf() const;
status_t ReplaceLeaf(const char *newLeaf);
status_t Append(const char *toAppend, bool isComponent = true);
KPath& operator=(const KPath& other);
KPath& operator=(const char* path);
@@ -40,6 +43,8 @@ public:
bool operator!=(const char* path) const;
private:
void _ChopTrailingSlashes();
char* fBuffer;
int32 fBufferSize;
int32 fPathLength;