(file) Return to FileSystem.h CVS log (file) (dir) Up to [Pegasus] / pegasus / src / Pegasus / Common

Diff for /pegasus/src/Pegasus/Common/FileSystem.h between version 1.19 and 1.21

version 1.19, 2002/06/01 00:56:31 version 1.21, 2002/07/26 20:01:19
Line 34 
Line 34 
 #include <Pegasus/Common/String.h> #include <Pegasus/Common/String.h>
 #include <Pegasus/Common/Array.h> #include <Pegasus/Common/Array.h>
 #include <Pegasus/Common/Exception.h> #include <Pegasus/Common/Exception.h>
   #include <Pegasus/Common/Linkage.h>
 #include <fstream> #include <fstream>
  
 PEGASUS_NAMESPACE_BEGIN PEGASUS_NAMESPACE_BEGIN
Line 280 
Line 281 
     */     */
     static void translateSlashes(String& path);     static void translateSlashes(String& path);
  
       /** Get an absolute path from an absolute directory and a relative or
           absolute file name.  If the file name is fully specified, it is
           returned unchanged.  Otherwise, the specified directory is prepended
           to the file name.
       */
       static String getAbsolutePath(const char* path, const String& filename);
   
 private: private:
  
     FileSystem() { }     FileSystem() { }
Line 343 
Line 351 
     return FileSystem::getFileSize(realPath, size);     return FileSystem::getFileSize(realPath, size);
 } }
  
   inline String FileSystem::getAbsolutePath(
       const char* path,
       const String& filename)
   {
       String absolutePath;
   
       if (filename != String::EMPTY)
       {
           if ((filename[0] != '/') && path && path[0])
           {
               absolutePath.append(path);
               absolutePath.append('/');
           }
           absolutePath.append(filename);
       }
       translateSlashes(absolutePath);
   
       return absolutePath;
   }
   
 inline Boolean Open(PEGASUS_STD(ifstream)& is, const String& path) inline Boolean Open(PEGASUS_STD(ifstream)& is, const String& path)
 { {
     char* tmpPath = path.allocateCString();     char* tmpPath = path.allocateCString();


Legend:
Removed from v.1.19  
changed lines
  Added in v.1.21

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2