37 #ifndef __CU_PATHNAME_H__
38 #define __CU_PATHNAME_H__
88 std::string _shortname;
90 std::string _pathname;
92 std::string _fullpath;
94 #pragma mark Normalization
107 static std::string normalize(
const std::string& path);
126 static std::string canonicalize(
const std::string& path);
137 static bool isAbsolute(
const std::string& path);
141 #pragma mark Constructors
213 Pathname(
const std::string& parent,
const std::string& child);
231 Pathname(
const char* parent,
const std::string& child) :
Pathname(std::string(parent),child) {}
249 Pathname(
const std::string& parent,
const char* child) :
Pathname(parent,std::string(child)) {}
267 Pathname(
const char* parent,
const char* child) :
Pathname(std::string(parent),std::string(child)) {}
300 #pragma mark Path Types
346 #pragma mark Path Names
361 std::string
getName()
const {
return _shortname; }
431 #pragma mark Path Hierarchy
471 std::vector<std::string>
list()
const;
484 std::vector<std::string>
list(
const std::function<
bool(
const std::string& file)>& filter)
const;
504 std::vector<Pathname>
listPaths(
const std::function<
bool(
const Pathname& path)>& filter)
const;
508 #pragma mark Path Creation
612 #pragma mark Path Access
743 #pragma mark Path Size
796 #pragma mark Path Operators
std::string getPathname() const
Definition: CUPathname.h:373
std::vector< std::string > list() const
size_t getTotalSpace() const
~Pathname()
Definition: CUPathname.h:296
Pathname(const Pathname &parent, const char *child)
Definition: CUPathname.h:291
bool operator<=(const Pathname &other) const
Definition: CUPathname.h:819
bool renameTo(const char *path)
Definition: CUPathname.h:591
std::string getParentName() const
bool setSearchable(bool searchable)
size_t getFreeSpace() const
bool renameTo(const std::string &path)
Definition: CUPathname.h:574
Pathname(const char *parent, const char *child)
Definition: CUPathname.h:267
bool operator>(const Pathname &other) const
Definition: CUPathname.h:832
bool operator>=(const Pathname &other) const
Definition: CUPathname.h:845
Pathname getParentPath() const
bool setReadable(bool readable)
Pathname getAbsolutePath() const
bool isHidden() const
Definition: CUPathname.h:342
size_t getAvailableSpace() const
std::string getAbsoluteName() const
Definition: CUPathname.h:407
bool operator<(const Pathname &other) const
Definition: CUPathname.h:806
Pathname(const std::string &parent, const char *child)
Definition: CUPathname.h:249
std::string getSuffix() const
Pathname(const char *parent, const std::string &child)
Definition: CUPathname.h:231
bool isAbsolute() const
Definition: CUPathname.h:352
std::vector< std::string > getComponents() const
static std::string getSeparator()
std::string getVolume() const
Pathname(const char *path)
Definition: CUPathname.h:195
long lastModified() const
Definition: CUAnimationNode.h:52
bool operator==(const Pathname &other) const
Definition: CUPathname.h:858
Definition: CUPathname.h:85
bool operator!=(const Pathname &other) const
Definition: CUPathname.h:871
std::string getName() const
Definition: CUPathname.h:361
bool setWritable(bool writable)
std::vector< Pathname > listPaths() const