xrootd
XrdSysDir.hh
Go to the documentation of this file.
1 #ifndef __SYS_DIR_H__
2 #define __SYS_DIR_H__
3 /******************************************************************************/
4 /* */
5 /* X r d S y s D i r . h h */
6 /* */
7 /* (c) 2006 G. Ganis (CERN) */
8 /* All Rights Reserved. See XrdInfo.cc for complete License Terms */
9 /******************************************************************************/
10 // $Id$
11 
13 // //
14 // XrdSysDir //
15 // //
16 // Author: G. Ganis, CERN, 2006 //
17 // //
18 // API for handling directories //
19 // //
21 
22 #if !defined(WINDOWS)
23 # include <sys/types.h>
24 #else
25 # define uid_t unsigned int
26 # define gid_t unsigned int
27 #endif
28 
29 class XrdSysDir
30 {
31  public:
32  XrdSysDir(const char *path);
33  virtual ~XrdSysDir();
34 
35  bool isValid() { return (dhandle ? 1 : 0); }
36  int lastError() { return lasterr; }
37  char *nextEntry();
38 
39  private:
40  void *dhandle; // Directory handle
41  int lasterr; // Error occured at last operation
42 };
43 #endif