(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.73 and 1.74

version 1.73, 2007/09/14 18:31:02 version 1.74, 2007/11/30 01:16:33
Line 36 
Line 36 
 #include <Pegasus/Common/Config.h> #include <Pegasus/Common/Config.h>
 #include <Pegasus/Common/System.h> #include <Pegasus/Common/System.h>
 #include <Pegasus/Common/AutoPtr.h> #include <Pegasus/Common/AutoPtr.h>
   #include <Executor/Match.h>
 #include "FileSystem.h" #include "FileSystem.h"
 #include "Dir.h" #include "Dir.h"
 #ifndef PEGASUS_OS_TYPE_WINDOWS #ifndef PEGASUS_OS_TYPE_WINDOWS
Line 75 
Line 76 
  
 Boolean FileSystem::existsNoCase(const String& path, String& realPath) Boolean FileSystem::existsNoCase(const String& path, String& realPath)
 { {
       // If a file exists that has the same case as the path parmater,
       // then we can bypass the expensive directory scanning below.
   
       if (FileSystem::exists(path))
       {
           realPath = path;
           return true;
       }
   
   
     realPath.clear();     realPath.clear();
     CString cpath = _clonePath(path);     CString cpath = _clonePath(path);
     const char* p = cpath;     const char* p = cpath;
Line 553 
Line 564 
 #endif #endif
 } }
  
   Boolean FileSystem::glob(
       const String& path,
       const String& pattern_,
       Array<String>& filenames)
   {
       filenames.clear();
   
       try
       {
           CString pattern(pattern_.getCString());
   
           for (Dir dir(path); dir.more(); dir.next())
           {
               const char* name = dir.getName();
   
               if (strcmp(name, ".") == 0 || strcmp(name, "..") == 0)
                   continue;
   
               if (Match(pattern, name) == 0)
                   filenames.append(name);
           }
       }
       catch (CannotOpenDirectory&)
       {
           return false;
       }
   
       return true;
   }
   
 PEGASUS_NAMESPACE_END PEGASUS_NAMESPACE_END


Legend:
Removed from v.1.73  
changed lines
  Added in v.1.74

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2