14 #ifndef CVSSOURCETREE_H 15 #define CVSSOURCETREE_H 62 std::string _basename;
67 bool force,
bool interactive);
83 const FilePaths &paths,
bool force,
bool interactive);
91 std::string prompt(
const std::string &message);
94 static Filename get_start_fullpath();
103 static bool _got_start_fullpath;
105 bool _got_root_fullpath;
bool is_valid() const
Returns true if this FilePath represents a valid file, or false if it represents an error return.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
void add_file(const std::string &basename, CVSSourceDirectory *dir)
Adds a new file to the set of known files.
Filename get_root_dirname() const
Returns the local directory name of the root of the tree.
Filename get_path() const
Returns the relative path to this file from the root of the source tree.
void set_root(const Filename &root_path)
Sets the root of the source directory.
Filename get_root_fullpath()
Returns the full path from the root to the top of the source hierarchy.
FilePath choose_directory(const std::string &basename, CVSSourceDirectory *suggested_dir, bool force, bool interactive)
Determines where an externally referenced model file of the indicated name should go.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
CVSSourceDirectory * find_directory(const Filename &path)
Returns the source directory that corresponds to the given path, or NULL if there is no such director...
This is our own Panda specialization on the default STL vector.
This represents one particular directory in the hierarchy of source directory files.
The name of a file, such as a texture file or an Egg file.
CVSSourceDirectory * find_dirname(const std::string &dirname)
Returns the source directory that corresponds to the given local directory name, or NULL if there is ...
This represents the root of the tree of source directory files.
static bool temp_chdir(const Filename &path)
Temporarily changes the current directory to the named path.
CVSSourceDirectory * find_relpath(const std::string &relpath)
Returns the source directory that corresponds to the given relative path from the root,...
bool scan(const Filename &key_filename)
Scans the complete source directory starting at the indicated pathname.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
Filename get_fullpath() const
Returns the full path to this file.
Filename get_rel_from(const CVSSourceDirectory *other) const
Returns the relative path to this file as seen from the indicated source directory.
static void restore_cwd()
Restores the current directory after changing it from temp_chdir().
FilePath()
Creates an invalid FilePath specification.
CVSSourceDirectory * get_root() const
Returns the root directory of the hierarchy.