Update of /cvsroot/libufo/ufo-0.5/include/ufo/util
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5300/include/ufo/util
Modified Files:
ufilearchive.hpp
Log Message:
Added isDirectory, dirName. Removed createFileStream, destroyFileStream.
Index: ufilearchive.hpp
===================================================================
RCS file: /cvsroot/libufo/ufo-0.5/include/ufo/util/ufilearchive.hpp,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** ufilearchive.hpp 21 May 2005 15:17:23 -0000 1.9
--- ufilearchive.hpp 17 Oct 2005 15:34:49 -0000 1.10
***************
*** 50,61 ****
public: // Public static methods
/** Checks if a file exists
! * @param fileNameA file to check
* @return true if the file exists
*/
static bool exists(const std::string & fileName);
/** Reads the contents of the given directory.
! * Returns an empty vector when the given directory is a file.
*/
! static std::vector<std::string> readDir(const std::string & dirName);
static UFileArchive * getDefault();
--- 50,75 ----
public: // Public static methods
/** Checks if a file exists
! * @param fileName file to check
* @return true if the file exists
*/
static bool exists(const std::string & fileName);
/** Reads the contents of the given directory.
! * @return A vector with all files found in the given directory
*/
! static std::vector<std::string> readDir(const std::string & path);
!
! /** Determins the directory component of a given path.
! * Example:
! * @code
! * dirNname ("/usr/local/foobar"); --> Returns: "/usr/local"
! * @endcode
! * @return The directory name
! */
! static std::string dirName(const std::string & path);
!
! /** Determines if the given path is really a directory.
! * @return True if path is a directory, otherwise false.
! */
! static bool isDirectory(const std::string & path);
static UFileArchive * getDefault();
***************
*** 69,75 ****
public: // Public methods
- /** adds some generic search directories */
- //static void init();
-
/** adds a further directory to the search path. */
void addArchive(const std::string & arc);
--- 83,86 ----
***************
*** 79,83 ****
void removeAllArchives();
! /** Adds a colon separated list to the search path. */
void addSearchPath(const std::string & searchPath);
/** Returns a colon separated list of the search path.
--- 90,94 ----
void removeAllArchives();
! /** Adds a colon (i.e. ':') separated list to the search path. */
void addSearchPath(const std::string & searchPath);
/** Returns a colon separated list of the search path.
***************
*** 91,122 ****
std::vector<std::string> getSearchPathAsVector() const;
! /** Checks if a file exists in the archive
! * @param fileNameA file to check
* @return true if the file exists
*/
! bool existsInArchive(const std::string & fileNameA);
!
! /** Returns the full path name of the given file name
! * if found in the archive.
! * Otherwise returns an empty string.
! */
! std::string getAbsolutePath(const std::string & fileNameA) const;
!
! /** Creates a file stream by teh given attributes.
! * This is done by iterating through the search path.
! * This method does not return NULL, but may return an
! * file stream which fails on operations
! * (i.e. ifstream::fail returns true).
! *
! * Please note: The created file stream has to be closed and deleted
! * by destroyFileStream!
! * @see destroyFileStream
! */
! std::ifstream * createFileStream(const std::string & fileNameA,
! std::ios_base::openmode modeA = std::ios_base::in);
! /** Closes and destroys a file stream object created by createFileStream.
*/
! void destroyFileStream(std::ifstream * fstream);
private: // Private static methods
--- 102,116 ----
std::vector<std::string> getSearchPathAsVector() const;
! /** Checks if a file with the given file name exists in the search path
! * @param fileName file to check
* @return true if the file exists
*/
! bool existsInArchive(const std::string & fileName);
! /** @param fileName file to search for
! * @return The full path name of the given file name
! * if found in the search path, otherwise an empty string.
*/
! std::string getAbsolutePath(const std::string & fileName) const;
private: // Private static methods
|