(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.48.6.1 and 1.55.22.3

version 1.48.6.1, 2007/09/12 15:46:57 version 1.55.22.3, 2013/10/09 05:26:07
Line 1 
Line 1 
 //%2006////////////////////////////////////////////////////////////////////////  //%LICENSE////////////////////////////////////////////////////////////////
 // //
 // Copyright (c) 2000, 2001, 2002 BMC Software; Hewlett-Packard Development  // Licensed to The Open Group (TOG) under one or more contributor license
 // Company, L.P.; IBM Corp.; The Open Group; Tivoli Systems.  // agreements.  Refer to the OpenPegasusNOTICE.txt file distributed with
 // Copyright (c) 2003 BMC Software; Hewlett-Packard Development Company, L.P.;  // this work for additional information regarding copyright ownership.
 // IBM Corp.; EMC Corporation, The Open Group.  // Each contributor licenses this file to you under the OpenPegasus Open
 // Copyright (c) 2004 BMC Software; Hewlett-Packard Development Company, L.P.;  // Source License; you may not use this file except in compliance with the
 // IBM Corp.; EMC Corporation; VERITAS Software Corporation; The Open Group.  // License.
 // Copyright (c) 2005 Hewlett-Packard Development Company, L.P.; IBM Corp.;  
 // EMC Corporation; VERITAS Software Corporation; The Open Group.  
 // Copyright (c) 2006 Hewlett-Packard Development Company, L.P.; IBM Corp.;  
 // EMC Corporation; Symantec Corporation; The Open Group.  
 // //
 // 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
 // of this software and associated documentation files (the "Software"), to  // copy of this software and associated documentation files (the "Software"),
 // deal in the Software without restriction, including without limitation the  // to deal in the Software without restriction, including without limitation
 // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or  // the rights to use, copy, modify, merge, publish, distribute, sublicense,
 // sell copies of the Software, and to permit persons to whom the Software is  // and/or sell copies of the Software, and to permit persons to whom the
 // furnished to do so, subject to the following conditions:  // Software is furnished to do so, subject to the following conditions:
 // //
 // THE ABOVE COPYRIGHT NOTICE AND THIS PERMISSION NOTICE SHALL BE INCLUDED IN  // The above copyright notice and this permission notice shall be included
 // ALL COPIES OR SUBSTANTIAL PORTIONS OF THE SOFTWARE. THE SOFTWARE IS PROVIDED  // in all copies or substantial portions of the Software.
 // "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT  
 // LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR  
 // PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT  
 // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN  
 // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION  
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.  
 // //
 //==============================================================================  // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
   // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
   // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
   // IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
   // CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
   // TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
   // SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
   //
   //////////////////////////////////////////////////////////////////////////
 // //
 //%///////////////////////////////////////////////////////////////////////////// //%/////////////////////////////////////////////////////////////////////////////
  
Line 36 
Line 34 
  
 #include <Pegasus/Common/Config.h> #include <Pegasus/Common/Config.h>
 #include <Pegasus/Common/String.h> #include <Pegasus/Common/String.h>
   #include <Pegasus/Common/Buffer.h>
 #include <Pegasus/Common/ArrayInternal.h> #include <Pegasus/Common/ArrayInternal.h>
 #include <Pegasus/Common/InternalException.h> #include <Pegasus/Common/InternalException.h>
 #include <Pegasus/Common/System.h> #include <Pegasus/Common/System.h>
Line 160 
Line 159 
         Return false if the base diretory does not exist or cannot be         Return false if the base diretory does not exist or cannot be
         accessed.         accessed.
     */     */
     static Boolean FileSystem::glob(      static Boolean glob(
         const String& path,         const String& path,
         const String& pattern,         const String& pattern,
         Array<String>& filenames);         Array<String>& filenames);
  
     /** Removes all files located under the directory given by *path* that  
         match the given pattern. Uses FileSystem::glob() to match file names.  
         Example: removeMatchingFiles("/tmp", "*.txt"). Fails if the pattern  
         matches a directory. May only remove ordinary files.  
     */  
     static Boolean removeMatchingFiles(  
         const String& path, const String& pattern);  
   
     /** Loads contents of the file into the array. Note that the file is     /** Loads contents of the file into the array. Note that the file is
         opened using binary mode (newline sequences are not expanded to         opened using binary mode (newline sequences are not expanded to
         carriage-return-line-feed sequences on Windows).         carriage-return-line-feed sequences on Windows).
Line 194 
Line 185 
         const String& path1,         const String& path1,
         const String& path2);         const String& path2);
  
     /** Renames a file.      /**
         @param oldPath old name of file.          Renames a file.  If the new name refers to an existing file, it is
         @param newPath new name of file.          removed and replaced with the renamed file.  The rename operation is
         @return true on success.          performed atomically.
           @param oldPath A String containing the name of the file to rename.
           @param newPath A String containing the name to which to rename the file.
           @return A Boolean indicating whether the rename operation was
               successful.
     */     */
     static Boolean renameFile(     static Boolean renameFile(
         const String& oldPath,         const String& oldPath,
         const String& newPath);         const String& newPath);
  
     /** Same as rename file except that the case of the file referred to     /** Same as rename file except that the case of the file referred to
         by oldPath is ignored.          by oldPath is ignored.  The case resolution of the oldPath is
           performed prior to the atomic rename operation.
     */     */
     static Boolean renameFileNoCase(     static Boolean renameFileNoCase(
         const String& oldPath,         const String& oldPath,
Line 360 
Line 356 
     */     */
     static String buildLibraryFileName(const String &libraryName);     static String buildLibraryFileName(const String &libraryName);
  
       /**
          Returns the platform-specific file name extension for dynamic
          libraries.
   
          @return the platform-specific file name extension for dynamic
          libraries.
       */
       static String getDynamicLibraryExtension();
   
     static Boolean changeFileOwner(     static Boolean changeFileOwner(
         const String& fileName,         const String& fileName,
         const String& userName);         const String& userName);
Line 488 
Line 493 
  
 /** Get the next line from the input file. /** Get the next line from the input file.
 */ */
 PEGASUS_COMMON_LINKAGE Boolean GetLine(PEGASUS_STD(istream)& is, String& line);  PEGASUS_COMMON_LINKAGE Boolean GetLine(PEGASUS_STD(istream)& is, Buffer& line);
   
   inline Boolean GetLine(PEGASUS_STD(istream)& is, String& line)
   {
       Buffer lineBuffer;
       Boolean result = GetLine(is, lineBuffer);
       line = String(lineBuffer.getData(), lineBuffer.size());
       return result;
   }
  
 PEGASUS_NAMESPACE_END PEGASUS_NAMESPACE_END
  


Legend:
Removed from v.1.48.6.1  
changed lines
  Added in v.1.55.22.3

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2