49 void EST_Pathname::setup(
void)
55 return length()>0 && (*this)(0) ==
'/';
69 if ((pos=
index(
"/", -1)) >=0)
125 struct dirent *entry;
127 while ((entry = readdir(dir)) !=
NULL)
132 if (check_for_directories &&
134 (buf.st_mode & S_IFDIR))
135 list.
append(name.as_directory());
203 result = result.
before(
".");
int contains(const char *s, ssize_t pos=-1) const
Does it contain this substring?
EST_String(void)
Construct an empty string.
static EST_Pathname construct(EST_Pathname dir, EST_String basename, EST_String extension)
int is_absolute(void) const
static EST_Pathname append(EST_Pathname directory, EST_Pathname addition)
EST_TList< EST_String > entries(int check_for_directories=1) const
size_t index(const char *s, ssize_t pos=0) const
Position of substring (starting at pos)
int is_filename(void) const
EST_Pathname as_file(void) const
EST_FVector add(const EST_FVector &a, const EST_FVector &b)
elementwise add
EST_Pathname filename(void) const
void append(const T &item)
add item onto end of list
friend EST_Pathname operator+(const EST_Pathname p, const EST_Pathname addition)
EST_Pathname & operator+=(const char *addition)
EST_String basename(int remove_all=0) const
size_t length(void) const
Length of string ({not} length of underlying chunk)
EST_Pathname directory(void) const
EST_String extension(void) const
int is_dirname(void) const
EST_String after(int pos, int len=1) const
Part after pos+len.
EST_String before(int pos, int len=0) const
Part before position.
EST_Pathname as_directory(void) const