15 #include "filenameUnifier.h" 17 #include "executionEnvironment.h" 19 Filename FilenameUnifier::_txa_filename;
21 Filename FilenameUnifier::_rel_dirname;
37 _txa_filename = txa_filename;
39 if (_txa_dir.empty()) {
59 _rel_dirname = rel_dirname;
60 if (!_rel_dirname.empty()) {
87 if (!filename.empty()) {
102 if (!filename.empty()) {
118 if (!filename.empty()) {
136 if (filename.empty()) {
142 CanonicalFilenames::iterator fi;
143 fi = _canonical_filenames.find(orig_dirname);
144 if (fi != _canonical_filenames.end()) {
149 Filename new_dirname = orig_dirname;
150 if (new_dirname.empty()) {
156 _canonical_filenames.insert(CanonicalFilenames::value_type(orig_dirname, new_dirname));
string get_dirname() const
Returns the directory part of the filename.
static Filename make_bam_filename(Filename filename)
Returns a new filename that's made relative to the bam file itself, suitable for writing to the bam f...
static void set_txa_filename(const Filename &txa_filename)
Notes the filename the .txa file was found in.
bool make_canonical()
Converts this filename to a canonical name by replacing the directory part with the fully-qualified d...
static Filename make_user_filename(Filename filename)
Returns a new filename that's made relative to the current directory, suitable for reporting to the u...
static Filename make_egg_filename(Filename filename)
Returns a new filename that's made relative to the rel_directory, suitable for writing out within egg...
The name of a file, such as a texture file or an Egg file.
static Filename get_bam_filename(Filename filename)
Returns an absolute pathname based on the given relative pathname, presumably read from the bam file ...
static void make_canonical(Filename &filename)
Does the same thing as Filename::make_canonical()–it converts the filename to its canonical form–bu...
void set_dirname(const string &s)
Replaces the directory part of the filename.
bool make_relative_to(Filename directory, bool allow_backups=true)
Adjusts this filename, which must be a fully-specified pathname beginning with a slash, to make it a relative filename, relative to the fully-specified directory indicated (which must also begin with, and may or may not end with, a slash–a terminating slash is ignored).
void make_absolute()
Converts the filename to a fully-qualified pathname from the root (if it is a relative pathname)...
static Filename get_cwd()
Returns the name of the current working directory.
static void set_rel_dirname(const Filename &rel_dirname)
Sets the name of the directory that texture filenames will be written relative to, when generating egg files.