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

Diff for /pegasus/src/Pegasus/Common/FileSystem.cpp between version 1.27 and 1.34

version 1.27, 2001/07/10 06:43:25 version 1.34, 2002/06/01 00:56:31
Line 1 
Line 1 
 //%///////////////////////////////////////////////////////////////////////////// //%/////////////////////////////////////////////////////////////////////////////
 // //
 // Copyright (c) 2000, 2001 The Open group, BMC Software, Tivoli Systems, IBM  // Copyright (c) 2000, 2001, 2002 BMC Software, Hewlett-Packard Company, IBM,
   // The Open Group, Tivoli Systems
 // //
 // Permission is hereby granted, free of charge, to any person obtaining a copy // Permission is hereby granted, free of charge, to any person obtaining a copy
 // of this software and associated documentation files (the "Software"), to // of this software and associated documentation files (the "Software"), to
Line 23 
Line 24 
 // Author: Mike Brasher (mbrasher@bmc.com) // Author: Mike Brasher (mbrasher@bmc.com)
 // //
 // Modified By: // Modified By:
   //         Ramnath Ravindran(Ramnath.Ravindran@compaq.com)
 // //
 //%///////////////////////////////////////////////////////////////////////////// //%/////////////////////////////////////////////////////////////////////////////
  
Line 228 
Line 230 
     return System::renameFile(p.getPointer(), q.getPointer());     return System::renameFile(p.getPointer(), q.getPointer());
 } }
  
   Boolean FileSystem::copyFile(
       const String& fromPath,
       const String& toPath)
   {
       ArrayDestroyer<char> p(fromPath.allocateCString());
       ArrayDestroyer<char> q(toPath.allocateCString());
       return System::copyFile(p.getPointer(), q.getPointer());
   }
   
 Boolean FileSystem::openNoCase(PEGASUS_STD(ifstream)& is, const String& path) Boolean FileSystem::openNoCase(PEGASUS_STD(ifstream)& is, const String& path)
 { {
     String realPath;     String realPath;
Line 235 
Line 246 
     if (!existsNoCase(path, realPath))     if (!existsNoCase(path, realPath))
         return false;         return false;
  
     ArrayDestroyer<char> p(_clonePath(path));      ArrayDestroyer<char> p(_clonePath(realPath));
  
     is.open(p.getPointer() PEGASUS_IOS_BINARY);     is.open(p.getPointer() PEGASUS_IOS_BINARY);
     return is != 0;      return !!is;
   }
   
   Boolean FileSystem::openNoCase(
       PEGASUS_STD(fstream)& fs,
       const String& path,
       int mode)
   {
       String realPath;
   
       if (!existsNoCase(path, realPath))
           return false;
   
       ArrayDestroyer<char> p(_clonePath(realPath));
   
       fs.open(p.getPointer(), mode);
       return !!fs;
 } }
  
 Boolean FileSystem::isDirectory(const String& path) Boolean FileSystem::isDirectory(const String& path)
Line 359 
Line 386 
     }     }
 } }
  
   Boolean GetLine(PEGASUS_STD(istream)& is, String& line)
   {
       line.clear();
   
       Boolean gotChar = false;
       char c;
   
       while (is.get(c))
       {
           gotChar = true;
   
           if (c == '\n')
               break;
   
           line.append(c);
       }
   
       return gotChar;
   }
   
 PEGASUS_NAMESPACE_END PEGASUS_NAMESPACE_END


Legend:
Removed from v.1.27  
changed lines
  Added in v.1.34

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2