(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.5 and 1.31

version 1.5, 2001/06/16 17:30:37 version 1.31, 2007/05/25 14:03:29
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_PLATFORM_SOLARIS_SPARC_GNU)
   # include <sys/param.h>
   # include <dirent.h>
   #endif
   #ifdef PEGASUS_OS_ZOS
   # include <dirent.h>
   #endif
  
 PEGASUS_NAMESPACE_BEGIN PEGASUS_NAMESPACE_BEGIN
  
 struct DirRep;  #if defined(PEGASUS_OS_TYPE_WINDOWS)
   # include <io.h>
    typedef struct
    {
   # if _MSC_VER < 1300
       long file;
   # else
       intptr_t file;
   # endif
       struct _finddata_t findData;
    } DirRep;
   #elif defined(PEGASUS_OS_TYPE_UNIX) || defined (PEGASUS_OS_VMS)
   # if defined(PEGASUS_OS_SOLARIS)
   #  include <sys/param.h>
   # endif /* if defined(PEGASUS_OS_SOLARIS) */
   
   # include <dirent.h>
   
   # define PEGASUS_HAS_READDIR_R
   
    struct DirRep
    {
       DIR* dir;
   # ifdef PEGASUS_OS_OS400
       struct dirent_lg* entry;
   # else /* ifdef PEGASUS_OS_OS400 */
       struct dirent* entry;
   # endif /* ifdef PEGASUS_OS_OS400 */
   # ifdef PEGASUS_HAS_READDIR_R
   #  ifdef PEGASUS_OS_OS400
        struct dirent_lg buffer;
   #  else /* ifdef PEGASUS_OS_OS400 */
   #   ifdef 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 */
       struct dirent buffer;
   #   endif /* ifdef PEGASUS_OS_SOLARIS */
   #  endif /* ifdef PEGASUS_OS_OS400 */
   # endif /* ifdef PEGASUS_HAS_READDIR_R */
   };
   #endif /* elif defined(PEGASUS_OS_TYPE_UNIX) || defined (PEGASUS_OS_VMS) */
  
 /** 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 133 
     /** 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 144 
  
     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.5  
changed lines
  Added in v.1.31

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2