diff options
28 files changed, 378 insertions, 367 deletions
diff --git a/include/llvm/System/Path.h b/include/llvm/System/Path.h index 1a77ca6272..7f59d60135 100644 --- a/include/llvm/System/Path.h +++ b/include/llvm/System/Path.h @@ -34,8 +34,8 @@ namespace sys { /// one invalid Path which is the empty path. The class should never allow any /// other syntactically invalid non-empty path name to be assigned. Empty /// paths are required in order to indicate an error result. If the path is - /// empty, the is_valid operation will return false. All operations will fail - /// if is_valid is false. Operations that change the path will either return + /// empty, the isValid operation will return false. All operations will fail + /// if isValid is false. Operations that change the path will either return /// false if it would cause a syntactically invalid path name (in which case /// the Path object is left unchanged) or throw an std::string exception /// indicating the error. @@ -138,7 +138,7 @@ namespace sys { /// the program. However, if the path is not valid, the Path object will /// be set to an empty string and an exception will be thrown. /// @throws std::string if the path string is not legal. - /// @param unvalidated_path The path to verify and assign. + /// @param unverified_path The path to verify and assign. /// @brief Construct a Path from a string. explicit Path(std::string unverified_path); @@ -193,13 +193,13 @@ namespace sys { /// @returns true iff the path name is syntactically legal for the /// host operating system. /// @brief Determine if a path is syntactically valid or not. - bool is_valid() const; + bool isValid() const; /// This function determines if the contents of the path name are /// empty. That is, the path has a zero length. /// @returns true iff the path is empty. /// @brief Determines if the path name is empty (invalid). - bool is_empty() const { return path.empty(); } + bool isEmpty() const { return path.empty(); } /// This function determines if the path name in this object is intended /// to reference a legal file name (as opposed to a directory name). This @@ -207,7 +207,7 @@ namespace sys { /// determines if the syntax of the path represents a file name or not. /// @returns true if this path name references a file. /// @brief Determines if the path name references a file. - bool is_file() const; + bool isFile() const; /// This function determines if the path name in this object is intended /// to reference a legal directory name (as opposed to a file name). This @@ -216,7 +216,7 @@ namespace sys { /// not. /// @returns true if the path name references a directory /// @brief Determines if the path name references a directory. - bool is_directory() const; + bool isDirectory() const; /// This function determines if the path name in this object references /// the root (top level directory) of the file system. The details of what @@ -224,7 +224,7 @@ namespace sys { /// will do the necessary checking. /// @returns true iff the path name references the root directory. /// @brief Determines if the path references the root directory. - bool is_root_directory() const; + bool isRootDirectory() const; /// This function opens the file associated with the path name provided by /// the Path object and reads its magic number. If the magic number at the @@ -232,24 +232,24 @@ namespace sys { /// cases (file not found, file not accessible, etc.) it returns false. /// @returns true if the magic number of the file matches \p magic. /// @brief Determine if file has a specific magic number - bool has_magic_number(const std::string& magic) const; + bool hasMagicNumber(const std::string& magic) const; /// This function determines if the path name in the object references an /// archive file by looking at its magic number. /// @returns true if the file starts with the magic number for an archive /// file. /// @brief Determine if the path references an archive file. - bool is_archive() const; + bool isArchive() const; /// This function determines if the path name in the object references an /// LLVM Bytecode file by looking at its magic number. /// @returns true if the file starts with the magic number for LLVM /// bytecode files. /// @brief Determine if the path references a bytecode file. - bool is_bytecode_file() const; + bool isBytecodeFile() const; /// This function determines if the path name references an existing file - /// or directory in the file system. Unlike is_file and is_directory, this + /// or directory in the file system. Unlike isFile and isDirectory, this /// function actually checks for the existence of the file or directory. /// @returns true if the pathname references an existing file. /// @brief Determines if the path is a file or directory in @@ -257,7 +257,7 @@ namespace sys { bool exists() const; /// This function determines if the path name references a readable file - /// or directory in the file system. Unlike is_file and is_directory, this + /// or directory in the file system. Unlike isFile and isDirectory, this /// function actually checks for the existence and readability (by the /// current program) of the file or directory. /// @returns true if the pathname references a readable file. @@ -266,7 +266,7 @@ namespace sys { bool readable() const; /// This function determines if the path name references a writable file - /// or directory in the file system. Unlike is_file and is_directory, this + /// or directory in the file system. Unlike isFile and isDirectory, this /// function actually checks for the existence and writability (by the /// current program) of the file or directory. /// @returns true if the pathname references a writable file. @@ -275,7 +275,7 @@ namespace sys { bool writable() const; /// This function determines if the path name references an executable - /// file in the file system. Unlike is_file and is_directory, this + /// file in the file system. Unlike isFile and isDirectory, this /// function actually checks for the existence and executability (by /// the current program) of the file. /// @returns true if the pathname references an executable file. @@ -291,8 +291,8 @@ namespace sys { std::string get() const { return path; } /// This function returns the last component of the path name. If the - /// is_directory() function would return true then this returns the name - /// of the last directory in the path. If the is_file() function would + /// isDirectory() function would return true then this returns the name + /// of the last directory in the path. If the isFile() function would /// return true then this function returns the name of the file without /// any of the preceding directories. /// @returns std::string containing the last component of the path name. @@ -304,7 +304,7 @@ namespace sys { /// @returns std::string containing the basename of the path /// @throws nothing /// @brief Get the base name of the path - std::string get_basename() const; + std::string getBasename() const; /// @returns a c string containing the path name. /// @brief Returns the path as a C string. @@ -329,7 +329,7 @@ namespace sys { /// @param unverified_path The path to be set in Path object. /// @throws nothing /// @brief Set a full path from a std::string - bool set_directory(const std::string& unverified_path); + bool setDirectory(const std::string& unverified_path); /// This method attempts to set the Path object to \p unverified_path /// and interpret the name as a file name. The \p unverified_path @@ -340,54 +340,54 @@ namespace sys { /// @param unverified_path The path to be set in Path object. /// @throws nothing /// @brief Set a full path from a std::string - bool set_file(const std::string& unverified_path); + bool setFile(const std::string& unverified_path); /// The \p dirname is added to the end of the Path if it is a legal /// directory name for the operating system. The precondition for this /// function is that the Path must reference a directory name (i.e. - /// is_directory() returns true). + /// isDirectory() returns true). /// @param dirname A string providing the directory name to /// be added to the end of the path. /// @returns false if the directory name could not be added /// @throws nothing /// @brief Adds the name of a directory to a Path. - bool append_directory( const std::string& dirname ); + bool appendDirectory( const std::string& dirname ); /// One directory component is removed from the Path name. The Path must - /// refer to a non-root directory name (i.e. is_directory() returns true - /// but is_root_directory() returns false). Upon exit, the Path will + /// refer to a non-root directory name (i.e. isDirectory() returns true + /// but isRootDirectory() returns false). Upon exit, the Path will /// refer to the directory above it. /// @throws nothing /// @returns false if the directory name could not be removed. /// @brief Removes the last directory component of the Path. - bool elide_directory(); + bool elideDirectory(); /// The \p filename is added to the end of the Path if it is a legal /// directory name for the operating system. The precondition for this /// function is that the Path reference a directory name (i.e. - /// is_directory() returns true). + /// isDirectory() returns true). /// @throws nothing /// @returns false if the file name could not be added. /// @brief Appends the name of a file. - bool append_file( const std::string& filename ); + bool appendFile( const std::string& filename ); /// One file component is removed from the Path name. The Path must - /// refer to a file (i.e. is_file() returns true). Upon exit, + /// refer to a file (i.e. isFile() returns true). Upon exit, /// the Path will refer to the directory above it. /// @throws nothing /// @returns false if the file name could not be removed /// @brief Removes the last file component of the path. - bool elide_file(); + bool elideFile(); /// A period and the \p suffix are appended to the end of the pathname. /// The precondition for this function is that the Path reference a file - /// name (i.e. is_file() returns true). If the Path is not a file, no + /// name (i.e. isFile() returns true). If the Path is not a file, no /// action is taken and the function returns false. If the path would /// become invalid for the host operating system, false is returned. /// @returns false if the suffix could not be added, true if it was. /// @throws nothing /// @brief Adds a period and the \p suffix to the end of the pathname. - bool append_suffix(const std::string& suffix); + bool appendSuffix(const std::string& suffix); /// The suffix of the filename is removed. The suffix begins with and /// includes the last . character in the filename after the last directory @@ -398,7 +398,7 @@ namespace sys { /// @returns false if there was no suffix to remove, true otherwise. /// @throws nothing /// @brief Remove the suffix from a path name. - bool elide_suffix(); + bool elideSuffix(); /// This method attempts to create a directory in the file system with the /// same name as the Path object. The \p create_parents parameter controls @@ -413,17 +413,17 @@ namespace sys { /// components other than the last one (the "parents") are created or not. /// @throws std::string if an error occurs. /// @brief Create the directory this Path refers to. - bool create_directory( bool create_parents = false ); + bool createDirectory( bool create_parents = false ); /// This method attempts to create a file in the file system with the same /// name as the Path object. The intermediate directories must all exist - /// at the time this method is called. Use create_directories to + /// at the time this method is called. Use createDirectories to /// accomplish that. The created file will be empty upon return from this /// function. /// @returns false if the Path does not reference a file, true otherwise. /// @throws std::string if an error occurs. /// @brief Create the file this Path refers to. - bool create_file(); + bool createFile(); /// This method attempts to destroy the directory named by the last in /// the Path name. If \p remove_contents is false, an attempt will be @@ -437,14 +437,14 @@ namespace sys { /// otherwise. /// @throws std::string if there is an error. /// @brief Removes the file or directory from the filesystem. - bool destroy_directory( bool destroy_contents = false ); + bool destroyDirectory( bool destroy_contents = false ); /// This method attempts to destroy the file named by the last item in the /// Path name. /// @returns false if the Path does not refer to a file, true otherwise. /// @throws std::string if there is an error. /// @brief Destroy the file this Path refers to. - bool destroy_file(); + bool destroyFile(); /// @} /// @name Data diff --git a/lib/Linker/LinkModules.cpp b/lib/Linker/LinkModules.cpp index fbf09781ba..a07caf3b69 100644 --- a/lib/Linker/LinkModules.cpp +++ b/lib/Linker/LinkModules.cpp @@ -946,9 +946,9 @@ bool llvm::LinkModules(Module *Dest, const Module *Src, std::string *ErrorMsg) { // If the source library's module id is in the dependent library list of the // destination library, remove it since that module is now linked in. sys::Path modId; - modId.set_file(Src->getModuleIdentifier()); - if (!modId.is_empty()) - Dest->removeLibrary(modId.get_basename()); + modId.setFile(Src->getModuleIdentifier()); + if (!modId.isEmpty()) + Dest->removeLibrary(modId.getBasename()); return false; } diff --git a/lib/System/AIX/Path.cpp b/lib/System/AIX/Path.cpp index 0d6c7fbd15..8eddb967bd 100644 --- a/lib/System/AIX/Path.cpp +++ b/lib/System/AIX/Path.cpp @@ -24,7 +24,7 @@ using namespace sys; //===----------------------------------------------------------------------===// bool -Path::is_valid() const { +Path::isValid() const { if (path.empty()) return false; if (path.length() >= MAXPATHLEN) @@ -43,8 +43,8 @@ Path::GetTemporaryDirectory() { if (!mkdir(TmpName, S_IRWXU)) ThrowErrno(std::string(TmpName) + ": Can't create temporary directory"); Path result; - result.set_directory(TmpName); - assert(result.is_valid() && "mkdtemp didn't create a valid pathname!"); + result.setDirectory(TmpName); + assert(result.isValid() && "mkdtemp didn't create a valid pathname!"); return result; } diff --git a/lib/System/Cygwin/Path.cpp b/lib/System/Cygwin/Path.cpp index 5b7d02ff93..3b95665f16 100644 --- a/lib/System/Cygwin/Path.cpp +++ b/lib/System/Cygwin/Path.cpp @@ -23,7 +23,7 @@ namespace llvm { using namespace sys; bool -Path::is_valid() const { +Path::isValid() const { if (path.empty()) return false; char pathname[MAXPATHLEN]; @@ -39,9 +39,9 @@ Path::GetTemporaryDirectory() { if (0 == pathname) ThrowErrno(std::string("Can't create temporary directory name")); Path result; - result.set_directory(pathname); + result.setDirectory(pathname); free(pathname); - assert(result.is_valid() && "tempnam didn't create a valid pathname!"); + assert(result.isValid() && "tempnam didn't create a valid pathname!"); if (0 != mkdir(result.c_str(), S_IRWXU)) ThrowErrno(result.get() + ": Can't create temporary directory"); return result; diff --git a/lib/System/Darwin/Path.cpp b/lib/System/Darwin/Path.cpp index 1edb15450b..ed39107948 100644 --- a/lib/System/Darwin/Path.cpp +++ b/lib/System/Darwin/Path.cpp @@ -23,7 +23,7 @@ namespace llvm { using namespace sys; bool -Path::is_valid() const { +Path::isValid() const { if (path.empty()) return false; if (path.length() >= MAXPATHLEN) @@ -38,8 +38,8 @@ Path::GetTemporaryDirectory() { if (0 == mkdtemp(pathname)) ThrowErrno(std::string(pathname) + ": Can't create temporary directory"); Path result; - result.set_directory(pathname); - assert(result.is_valid() && "mkdtemp didn't create a valid pathname!"); + result.setDirectory(pathname); + assert(result.isValid() && "mkdtemp didn't create a valid pathname!"); return result; } diff --git a/lib/System/FreeBSD/Path.cpp b/lib/System/FreeBSD/Path.cpp index 61b25024b1..21bc4e1765 100644 --- a/lib/System/FreeBSD/Path.cpp +++ b/lib/System/FreeBSD/Path.cpp @@ -23,7 +23,7 @@ namespace llvm { using namespace sys; bool -Path::is_valid() const { +Path::isvalid() const { if (path.empty()) return false; char pathname[MAXPATHLEN]; @@ -40,8 +40,8 @@ Path::GetTemporaryDirectory() { if (0 == mkdtemp(pathname)) ThrowErrno(std::string(pathname) + ": Can't create temporary directory"); Path result; - result.set_directory(pathname); - assert(result.is_valid() && "mkdtemp didn't create a valid pathname!"); + result.setDirectory(pathname); + assert(result.isValid() && "mkdtemp didn't create a valid pathname!"); return result; } diff --git a/lib/System/Interix/Path.cpp b/lib/System/Interix/Path.cpp index 47f6c5d7db..45ab13a6dc 100644 --- a/lib/System/Interix/Path.cpp +++ b/lib/System/Interix/Path.cpp @@ -23,7 +23,7 @@ namespace llvm { using namespace sys; bool -Path::is_valid() const { +Path::isValid() const { if (path.empty()) return false; char pathname[MAXPATHLEN]; @@ -40,8 +40,8 @@ Path::GetTemporaryDirectory() { if (0 == mkdtemp(pathname)) ThrowErrno(std::string(pathname) + ": Can't create temporary directory"); Path result; - result.set_directory(pathname); - assert(result.is_valid() && "mkdtemp didn't create a valid pathname!"); + result.setDirectory(pathname); + assert(result.isValid() && "mkdtemp didn't create a valid pathname!"); return result; } diff --git a/lib/System/Linux/Path.cpp b/lib/System/Linux/Path.cpp index 665c272841..5238c1f329 100644 --- a/lib/System/Linux/Path.cpp +++ b/lib/System/Linux/Path.cpp @@ -23,7 +23,7 @@ namespace llvm { using namespace sys; bool -Path::is_valid() const { +Path::isValid() const { if (path.empty()) return false; char pathname[MAXPATHLEN]; @@ -40,8 +40,8 @@ Path::GetTemporaryDirectory() { if (0 == mkdtemp(pathname)) ThrowErrno(std::string(pathname) + ": Can't create temporary directory"); Path result; - result.set_directory(pathname); - assert(result.is_valid() && "mkdtemp didn't create a valid pathname!"); + result.setDirectory(pathname); + assert(result.isValid() && "mkdtemp didn't create a valid pathname!"); return result; } diff --git a/lib/System/SunOS/Path.cpp b/lib/System/SunOS/Path.cpp index 4ba83ff89e..7fac37d8d2 100644 --- a/lib/System/SunOS/Path.cpp +++ b/lib/System/SunOS/Path.cpp @@ -23,7 +23,7 @@ namespace llvm { using namespace sys; bool -Path::is_valid() const { +Path::isValid() const { if (path.empty()) return false; char pathname[MAXPATHLEN]; @@ -39,9 +39,9 @@ Path::GetTemporaryDirectory() { if (0 == pathname) ThrowErrno(std::string("Can't create temporary directory name")); Path result; - result.set_directory(pathname); + result.setDirectory(pathname); free(pathname); - assert(result.is_valid() && "tempnam didn't create a valid pathname!"); + assert(result.isValid() && "tempnam didn't create a valid pathname!"); if (0 != mkdir(result.c_str(), S_IRWXU)) ThrowErrno(result.get() + ": Can't create temporary directory"); return result; diff --git a/lib/System/Unix/Path.cpp b/lib/System/Unix/Path.cpp index c9333decbf..4f4d347f09 100644 --- a/lib/System/Unix/Path.cpp +++ b/lib/System/Unix/Path.cpp @@ -30,7 +30,7 @@ Path::Path(std::string unverified_path) { if (unverified_path.empty()) return; - if (this->is_valid()) + if (this->isValid()) return; // oops, not valid. path.clear(); @@ -40,28 +40,28 @@ Path::Path(std::string unverified_path) Path Path::GetRootDirectory() { Path result; - result.set_directory("/"); + result.setDirectory("/"); return result; } static inline bool IsLibrary(Path& path, const std::string& basename) { - if (path.append_file(std::string("lib") + basename)) { - if (path.append_suffix(Path::GetDLLSuffix()) && path.readable()) + if (path.appendFile(std::string("lib") + basename)) { + if (path.appendSuffix(Path::GetDLLSuffix()) && path.readable()) return true; - else if (path.elide_suffix() && path.append_suffix("a") && path.readable()) + else if (path.elideSuffix() && path.appendSuffix("a") && path.readable()) return true; - else if (path.elide_suffix() && path.append_suffix("o") && path.readable()) + else if (path.elideSuffix() && path.appendSuffix("o") && path.readable()) return true; - else if (path.elide_suffix() && path.append_suffix("bc") && path.readable()) + else if (path.elideSuffix() && path.appendSuffix("bc") && path.readable()) return true; - } else if (path.elide_file() && path.append_file(basename)) { - if (path.append_suffix(Path::GetDLLSuffix()) && path.readable()) + } else if (path.elideFile() && path.appendFile(basename)) { + if (path.appendSuffix(Path::GetDLLSuffix()) && path.readable()) return true; - else if (path.elide_suffix() && path.append_suffix("a") && path.readable()) + else if (path.elideSuffix() && path.appendSuffix("a") && path.readable()) return true; - else if (path.elide_suffix() && path.append_suffix("o") && path.readable()) + else if (path.elideSuffix() && path.appendSuffix("o") && path.readable()) return true; - else if (path.elide_suffix() && path.append_suffix("bc") && path.readable()) + else if (path.elideSuffix() && path.appendSuffix("bc") && path.readable()) return true; } path.clear(); @@ -76,20 +76,20 @@ Path::GetLibraryPath(const std::string& basename, // Try the paths provided for (std::vector<std::string>::const_iterator I = LibPaths.begin(), E = LibPaths.end(); I != E; ++I ) { - if (result.set_directory(*I) && IsLibrary(result,basename)) + if (result.setDirectory(*I) && IsLibrary(result,basename)) return result; } // Try the LLVM lib directory in the LLVM install area - if (result.set_directory(LLVM_LIBDIR) && IsLibrary(result,basename)) + if (result.setDirectory(LLVM_LIBDIR) && IsLibrary(result,basename)) return result; // Try /usr/lib - if (result.set_directory("/usr/lib/") && IsLibrary(result,basename)) + if (result.setDirectory("/usr/lib/") && IsLibrary(result,basename)) return result; // Try /lib - if (result.set_directory("/lib/") && IsLibrary(result,basename)) + if (result.setDirectory("/lib/") && IsLibrary(result,basename)) return result; // Can't find it, give up and return invalid path. @@ -115,7 +115,7 @@ Path::GetLLVMDefaultConfigDir() { Path Path::GetLLVMConfigDir() { Path result; - if (result.set_directory(LLVM_ETCDIR)) + if (result.setDirectory(LLVM_ETCDIR)) return result; return GetLLVMDefaultConfigDir(); } @@ -125,24 +125,24 @@ Path::GetUserHomeDirectory() { const char* home = getenv("HOME"); if (home) { Path result; - if (result.set_directory(home)) + if (result.setDirectory(home)) return result; } return GetRootDirectory(); } bool -Path::is_file() const { - return (is_valid() && path[path.length()-1] != '/'); +Path::isFile() const { + return (isValid() && path[path.length()-1] != '/'); } bool -Path::is_directory() const { - return (is_valid() && path[path.length()-1] == '/'); +Path::isDirectory() const { + return (isValid() && path[path.length()-1] == '/'); } std::string -Path::get_basename() const { +Path::getBasename() const { // Find the last slash size_t slash = path.rfind('/'); if (slash == std::string::npos) @@ -153,7 +153,7 @@ Path::get_basename() const { return path.substr(slash, path.rfind('.')); } -bool Path::has_magic_number(const std::string &Magic) const { +bool Path::hasMagicNumber(const std::string &Magic) const { size_t len = Magic.size(); char buf[ 1 + len]; std::ifstream f(path.c_str()); @@ -163,17 +163,17 @@ bool Path::has_magic_number(const std::string &Magic) const { } bool -Path::is_bytecode_file() const { +Path::isBytecodeFile() const { if (readable()) { - return has_magic_number("llvm"); + return hasMagicNumber("llvm"); } return false; } bool -Path::is_archive() const { +Path::isArchive() const { if (readable()) { - return has_magic_number("!<arch>\012"); + return hasMagicNumber("!<arch>\012"); } return false; } @@ -221,7 +221,7 @@ Path::getLast() const { } bool -Path::set_directory(const std::string& a_path) { +Path::setDirectory(const std::string& a_path) { if (a_path.size() == 0) return false; Path save(*this); @@ -229,7 +229,7 @@ Path::set_directory(const std::string& a_path) { size_t last = a_path.size() -1; if (last != 0 && a_path[last] != '/') path += '/'; - if (!is_valid()) { + if (!isValid()) { path = save.path; return false; } @@ -237,7 +237,7 @@ Path::set_directory(const std::string& a_path) { } bool -Path::set_file(const std::string& a_path) { +Path::setFile(const std::string& a_path) { if (a_path.size() == 0) return false; Path save(*this); @@ -246,7 +246,7 @@ Path::set_file(const std::string& a_path) { while (last > 0 && a_path[last] == '/') last--; path.erase(last+1); - if (!is_valid()) { + if (!isValid()) { path = save.path; return false; } @@ -254,13 +254,13 @@ Path::set_file(const std::string& a_path) { } bool -Path::append_directory(const std::string& dir) { - if (is_file()) +Path::appendDirectory(const std::string& dir) { + if (isFile()) return false; Path save(*this); path += dir; path += "/"; - if (!is_valid()) { + if (!isValid()) { path = save.path; return false; } @@ -268,8 +268,8 @@ Path::append_directory(const std::string& dir) { } bool -Path::elide_directory() { - if (is_file()) +Path::elideDirectory() { + if (isFile()) return false; size_t slashpos = path.rfind('/',path.size()); if (slashpos == 0 || slashpos == std::string::npos) @@ -283,12 +283,12 @@ Path::elide_directory() { } bool -Path::append_file(const std::string& file) { - if (!is_directory()) +Path::appendFile(const std::string& file) { + if (!isDirectory()) return false; Path save(*this); path += file; - if (!is_valid()) { + if (!isValid()) { path = save.path; return false; } @@ -296,8 +296,8 @@ Path::append_file(const std::string& file) { } bool -Path::elide_file() { - if (is_directory()) +Path::elideFile() { + if (isDirectory()) return false; size_t slashpos = path.rfind('/',path.size()); if (slashpos == std::string::npos) @@ -307,13 +307,13 @@ Path::elide_file() { } bool -Path::append_suffix(const std::string& suffix) { - if (is_directory()) +Path::appendSuffix(const std::string& suffix) { + if (isDirectory()) return false; Path save(*this); path.append("."); path.append(suffix); - if (!is_valid()) { + if (!isValid()) { path = save.path; return false; } @@ -321,8 +321,8 @@ Path::append_suffix(const std::string& suffix) { } bool -Path::elide_suffix() { - if (is_directory()) return false; +Path::elideSuffix() { + if (isDirectory()) return false; size_t dotpos = path.rfind('.',path.size()); size_t slashpos = path.rfind('/',path.size()); if (slashpos != std::string::npos && dotpos != std::string::npos && @@ -335,9 +335,9 @@ Path::elide_suffix() { bool -Path::create_directory( bool create_parents) { +Path::createDirectory( bool create_parents) { // Make sure we're dealing with a directory - if (!is_directory()) return false; + if (!isDirectory()) return false; // Get a writeable copy of the path name char pathname[MAXPATHLEN]; @@ -372,9 +372,9 @@ Path::create_directory( bool create_parents) { } bool -Path::create_file() { +Path::createFile() { // Make sure we're dealing with a file - if (!is_file()) return false; + if (!isFile()) return false; // Create the file int fd = ::creat(path.c_str(), S_IRUSR | S_IWUSR); @@ -386,9 +386,9 @@ Path::create_file() { } bool -Path::destroy_directory(bool remove_contents) { +Path::destroyDirectory(bool remove_contents) { // Make sure we're dealing with a directory - if (!is_directory()) return false; + if (!isDirectory()) return false; // If it doesn't exist, we're done. if (!exists()) return true; @@ -412,8 +412,8 @@ Path::destroy_directory(bool remove_contents) { } bool |