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

Diff for /pegasus/src/Pegasus/Common/Dir.h between version 1.7 and 1.33.6.1

version 1.7, 2001/07/10 06:43:25 version 1.33.6.1, 2007/09/12 07:18:43
Line 1 
Line 1 
 //%/////////////////////////////////////////////////////////////////////////////  //%2006////////////////////////////////////////////////////////////////////////
 // //
 // Copyright (c) 2000, 2001 The Open group, BMC Software, Tivoli Systems, IBM  // Copyright (c) 2000, 2001, 2002 BMC Software; Hewlett-Packard Development
   // Company, L.P.; IBM Corp.; The Open Group; Tivoli Systems.
   // Copyright (c) 2003 BMC Software; Hewlett-Packard Development Company, L.P.;
   // IBM Corp.; EMC Corporation, The Open Group.
   // Copyright (c) 2004 BMC Software; Hewlett-Packard Development Company, L.P.;
   // IBM Corp.; EMC Corporation; VERITAS Software Corporation; The Open Group.
   // 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 copy
 // of this software and associated documentation files (the "Software"), to // of this software and associated documentation files (the "Software"), to
Line 20 
Line 29 
 // //
 //============================================================================== //==============================================================================
 // //
 // Author: Mike Brasher (mbrasher@bmc.com)  
 //  
 // Modified By:  
 //  
 //%///////////////////////////////////////////////////////////////////////////// //%/////////////////////////////////////////////////////////////////////////////
  
 #ifndef Pegasus_Dir_h #ifndef Pegasus_Dir_h
Line 31 
Line 36 
  
 #include <Pegasus/Common/Config.h> #include <Pegasus/Common/Config.h>
 #include <Pegasus/Common/String.h> #include <Pegasus/Common/String.h>
 #include <Pegasus/Common/Exception.h>  #include <Pegasus/Common/InternalException.h>
   #include <Pegasus/Common/Linkage.h>
   #include <Pegasus/Common/AutoPtr.h>
   
   #if defined(PEGASUS_OS_SOLARIS)
   # include <sys/param.h>
   #endif
   
   #if defined(PEGASUS_OS_TYPE_WINDOWS)
   # include <io.h>
   #else // if defined(PEGASUS_OS_TYPE_UNIX) || defined (PEGASUS_OS_VMS)
   # include <dirent.h>
   #endif
  
 PEGASUS_NAMESPACE_BEGIN PEGASUS_NAMESPACE_BEGIN
  
 struct DirRep;  #if defined(PEGASUS_OS_TYPE_WINDOWS)
   
   typedef struct
   {
   # if _MSC_VER < 1300
       long file;
   # else
       intptr_t file;
   # endif
       struct _finddata_t findData;
   } DirRep;
   
   #else // if defined(PEGASUS_OS_TYPE_UNIX) || defined (PEGASUS_OS_VMS)
   
   struct DirRep
   {
       DIR* dir;
       struct dirent* entry;
   
   # if defined(PEGASUS_OS_SOLARIS)
   private:
       char buf[sizeof(dirent) + MAXNAMELEN];
   public:
       struct dirent& buffer;
       inline DirRep()
           : buffer(*reinterpret_cast<struct dirent *>(buf))
       { }
   # else /* ifdef PEGASUS_OS_SOLARIS */
       union
       {
           struct dirent buffer;
           char filler[4096];
       };
   # endif /* ifdef PEGASUS_OS_SOLARIS */
   };
   #endif
  
 /** The Dir class provides a platform independent way of iterating the /** The Dir class provides a platform independent way of iterating the
     files in a directory.     files in a directory.
Line 72 
Line 124 
     /** Return true if there are more file names to iterator. */     /** Return true if there are more file names to iterator. */
     Boolean more() const { return _more; }     Boolean more() const { return _more; }
  
   
     /** Returns the current file name. */     /** Returns the current file name. */
     const char* getName() const;     const char* getName() const;
  
Line 82 
Line 135 
  
     Boolean _more;     Boolean _more;
     Boolean _isValid;     Boolean _isValid;
     DirRep* _rep;      String _path;
       DirRep _dirRep;
 }; };
  
 PEGASUS_NAMESPACE_END PEGASUS_NAMESPACE_END


Legend:
Removed from v.1.7  
changed lines
  Added in v.1.33.6.1

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2