Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Sep 2, 2006, 1:19:24 PM (18 years ago)
Author:
bensch
Message:

directory expansion

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/new_class_id/src/lib/util/filesys/directory.cc

    r8523 r9719  
    4141#include <sys/stat.h>
    4242#include <dirent.h>
     43const char Directory::delimiter = '/';
    4344#else
    4445#include <windows.h>
    4546#include <winbase.h>
     47const char Direcotry::delimiter = '\\';
    4648#endif
    4749
     
    6365 */
    6466Directory::Directory(const Directory& directory)
    65   : File(directory)
     67    : File(directory)
    6668{
    6769  this->_opened = directory._opened;
     
    166168#endif
    167169}
     170
     171
     172Directory Directory::operator+(const Directory& dir) const
     173{
     174  return Directory(*this) += dir;
     175}
     176
     177/**
     178 * @param dir the Directory to append to this one (say this one is "/var", then dir can be "log")
     179 * @returns The Directory appended by dir.
     180 *
     181 * @note the Directoy will again be closed even if it was opened previously!
     182 */
     183Directory& Directory::operator+=(const Directory& dir)
     184{
     185  this->setFileName(this->name() + Directory::delimiter + dir.name());
     186  return *this;
     187}
     188
     189/**
     190 * @brief Traverses the Directory tree one step up. (Parent Directory)
     191 * @returns a Reference to the Directory.
     192 */
     193Directory& Directory::operator--()
     194{
     195}
     196
     197
     198/**
     199 * @brief Traverses the Directory tree one step up. (Parent Directory)
     200 * @param int the PostFix iterator
     201 * @returns a Reference to the Directory.
     202 */
     203Directory& Directory::operator--(int)
     204{
     205}
     206
     207/**
     208 * @returns The Parent Directory.
     209 */
     210Directory Directory::parentDir() const
     211{
     212
     213}
Note: See TracChangeset for help on using the changeset viewer.