(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.1.1.1 and 1.9

version 1.1.1.1, 2001/01/14 19:51:36 version 1.9, 2001/05/06 13:16:16
Line 1 
Line 1 
 //BEGIN_LICENSE  //%/////////////////////////////////////////////////////////////////////////////
 // //
 // Copyright (c) 2000 The Open Group, BMC Software, Tivoli Systems, IBM // Copyright (c) 2000 The Open Group, BMC Software, Tivoli Systems, IBM
 // //
Line 17 
Line 17 
 // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
 // DEALINGS IN THE SOFTWARE. // DEALINGS IN THE SOFTWARE.
 // //
 //END_LICENSE  //==============================================================================
 //BEGIN_HISTORY  
 // //
 // Author:  // Author: Mike Brasher (mbrasher@bmc.com)
 // //
 // $Log$  // Modified By:
 // Revision 1.1.1.1  2001/01/14 19:51:36  mike  
 // Pegasus import  
 // //
 //  //%/////////////////////////////////////////////////////////////////////////////
 //END_HISTORY  
  
 //////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
 // //
Line 43 
Line 39 
  
 #include <Pegasus/Common/Config.h> #include <Pegasus/Common/Config.h>
 #include <Pegasus/Common/String.h> #include <Pegasus/Common/String.h>
   #include <Pegasus/Common/Array.h>
 #include <Pegasus/Common/Exception.h> #include <Pegasus/Common/Exception.h>
  
 PEGASUS_NAMESPACE_BEGIN PEGASUS_NAMESPACE_BEGIN
Line 51 
Line 48 
 { {
 public: public:
  
     // Return true if the file exists (and false otherwise).      /// Return true if the file exists (and false otherwise).
   
     static Boolean exists(const String& path);     static Boolean exists(const String& path);
  
       /** Return true if the file exists (and false otherwise). Ignore the
           case of the file and return the real name of the file.
       */
       static Boolean existsIgnoreCase(const String& path, String& realPath);
   
     // Returns true if the file exists and can be read:     // Returns true if the file exists and can be read:
  
     static Boolean canRead(const String& path);     static Boolean canRead(const String& path);
Line 83 
Line 84 
  
     static Boolean getFileSize(const String& path, Uint32& size);     static Boolean getFileSize(const String& path, Uint32& size);
  
     // Remove the given directory:      /** Get the current working Directory. */
       static Boolean getCurrentDirectory(String& path);
  
       /** Remove the given directory. The directory must be empty
           to be eligible for removal
           @param String path is the relative or ablsolute path to
           the directory to remove
           @return true if directory removed
       */
     static Boolean removeDirectory(const String& path);     static Boolean removeDirectory(const String& path);
  
     // Remove the given file:      /** Remove a directory hiearchy. Removes a complete hiearchy of
           directories and files.
  
           WARNING: This differs significantly from the <TT>removeDirectory</TT>
           function in that it removes both directories and files and
           removes a complete hiearchy.  Use with caution.
           @param path defines the high level directory to be removed
           @return Boolean True if successful
           @exception  - ATTN: Not sure if there is any exception
       */
       static Boolean removeDirectoryHier(const String& path);
   
       /** Remove the file defined by the input parameter
           @param path of file to remove
           @return Boolean true if directory removed
       */
     static Boolean removeFile(const String& path);     static Boolean removeFile(const String& path);
  
     // Get the names of the files (and directories) in the given directory:      /** Get the names of the files (and directories) in the given directory:
  
           @param path - the path of the directory from which we will get filenames
           @param paths - On return, this  Array contains the names of the files
           in the directory
           ATTN: Is this local names or fully qualified names with paths.
           @return Boolean that is today only true.
           @exception Throws "NoSuchDirectory" if the directory defined in path does
           not exist.
       */
     static Boolean getDirectoryContents(     static Boolean getDirectoryContents(
         const String& path,         const String& path,
         Array<String>& paths);         Array<String>& paths);
  
     // Load the contents of the file into the array. Throws CannotOpenFile if      /** Load the contents of the file into the array. Throws CannotOpenFile if
     // unable to open file.          unable to open file.
       */
  
     static void loadFileToMemory(     static void loadFileToMemory(
         Array<Sint8>& array,         Array<Sint8>& array,
         const String& fileName);         const String& fileName);
  
     // Return true if the two files are identical. Throws CannotOpenFile if      /** Compare two file for content.
     // either file cannot be opened.          @param filename of first file
           @param filename of second file
           ATTN: are filenames local or global???
           @return Return true if the two files are identical.
           @exception Throws CannotOpenFile if either file cannot be opened.
       */
     static Boolean compare(     static Boolean compare(
         const String& fileName1,         const String& fileName1,
         const String& fileName2);         const String& fileName2);
   
       /** Rename the given file to the new name. */
       static Boolean renameFile(
           const String& oldFileName,
           const String& newFileName);
   
       /** Translate backward slashes to forward slashes: */
       static void translateSlashes(String& path);
   
       /** Returns true is the given directory is empty. */
       static Boolean isDirectoryEmpty(const String& path);
 }; };
  
 PEGASUS_NAMESPACE_END PEGASUS_NAMESPACE_END


Legend:
Removed from v.1.1.1.1  
changed lines
  Added in v.1.9

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2