X-Git-Url: https://feistymeow.org/gitweb/?a=blobdiff_plain;f=nucleus%2Flibrary%2Ffilesystem%2Ffilename.h;h=f609f9016b0b14f85e8d5625d1da5d2b590d551d;hb=46db3e069f6346301f8d55a1d155a4904f18ec1e;hp=8e257358def959d93da0fcb8c4e2e2e8ff271448;hpb=7a381305a6cd14cf4254b6259a3ffb0e1912b390;p=feisty_meow.git diff --git a/nucleus/library/filesystem/filename.h b/nucleus/library/filesystem/filename.h index 8e257358..f609f901 100644 --- a/nucleus/library/filesystem/filename.h +++ b/nucleus/library/filesystem/filename.h @@ -63,6 +63,9 @@ public: /*!< this means that not only was the pathname parsed and found valid, but the file actually exists. */ + void reset(const basis::astring &name); + //!< changes the file name held by the object. + const basis::astring &raw() const; //!< returns the astring that we're holding onto for the path. basis::astring &raw(); @@ -185,18 +188,19 @@ public: the file to be created or accessed). the "replacement" is used as the character that is substituted instead of illegal characters. */ - void separate(structures::string_array &pieces) const; - //!< breaks the filename into its component directories. - /*!< this returns an array containing the component names. the last - component, unless the filename held is actually a directory, should be the - name of the file. if the first character is a directory, then the first - component will be empty. */ + void separate(bool &rooted, structures::string_array &pieces) const; + //!< breaks the filename into its component parts. + /*!< this returns an array containing the component names for the path in + this filename object. if the "rooted" flag is set to true, then the path + was absolute (i.e. started at '/' in unix. this notion is not needed for + dos/windoze, as the first component will be something like 'a:'). */ - void join(const structures::string_array &pieces); + void join(bool rooted, const structures::string_array &pieces); //!< undoes a separate() operation to get the filename back. /*!< "this" is set to a filename made from each of the "pieces". if there - are any directory separators inside the pieces, then they will be removed - by canonicalize(). */ + are any directory separators inside the pieces themselves, then they will + be removed by canonicalize(). if separate() said the path was rooted, + then join needs to be told that. */ // these implement the packing functionality. virtual void pack(basis::byte_array &packed_form) const;