CMS 3D CMS Logo

Filename.h

Go to the documentation of this file.
00001 #ifndef CLASSLIB_SYSAPI_FILENAME_H
00002 # define CLASSLIB_SYSAPI_FILENAME_H
00003 
00004 //<<<<<< INCLUDES                                                       >>>>>>
00005 
00006 # include "classlib/sysapi/IOTypes.h"
00007 # include <cerrno>
00008 # ifdef _WIN32
00009 #  include <windows.h>
00010 #  include <direct.h>
00011 #  include "classlib/sysapi/WindowsIO.h"
00012 # else
00013 #  include <unistd.h>
00014 #  include <sys/stat.h>
00015 #  include <fcntl.h>
00016 #  if HAVE_GLOB
00017 #   include <glob.h>
00018 #  endif
00019 # endif
00020 
00021 //<<<<<< PUBLIC DEFINES                                                 >>>>>>
00022 
00024 # ifdef _WIN32
00025 
00027 static const char s_drives [] = ("abcdefghijklmnopqrstuvwxyz"
00028                                  "ABCDEFGHIJKLMNOPQRSTUVWXYZ");
00029 
00031 #  define ISDRIVECHR(x) (strchr (s_drives, (x)))
00032 
00034 #  define ISPATHSEP(p)  (*(p) == '\\' || *(p) == '/')
00035 
00037 #  define ISSHARE(p)    (ISPATHSEP(p) && ISPATHSEP(p+1))
00038 
00040 #  define ISDRIVE(p)    (ISDRIVECHR(*(p)) && *((p)+1) == ':')
00041 
00043 #  define PATHSEP       '\\'
00044 
00046 #  define ISWIN32       true
00047 
00048 // Map to hidden names
00049 #  define access        _access
00050 #  define unlink        _unlink
00051 # else // ! _WIN32
00052 
00054 #  define ISPATHSEP(p)  (*(p) == '/')
00055 
00057 #  define ISSHARE(p)    false
00058 
00060 #  define ISDRIVE(p)    false
00061 
00063 #  define PATHSEP       '/'
00064 
00066 #  define ISWIN32       false
00067 
00068 # endif // _WIN32
00069 
00070 //<<<<<< PUBLIC CONSTANTS                                               >>>>>>
00071 //<<<<<< PUBLIC TYPES                                                   >>>>>>
00072 //<<<<<< PUBLIC VARIABLES                                               >>>>>>
00073 //<<<<<< PUBLIC FUNCTIONS                                               >>>>>>
00074 //<<<<<< CLASS DECLARATIONS                                             >>>>>>
00075 //<<<<<< INLINE PUBLIC FUNCTIONS                                        >>>>>>
00076 //<<<<<< INLINE MEMBER FUNCTIONS                                        >>>>>>
00077 
00078 #endif // CLASSLIB_SYSAPI_FILENAME_H

Generated on Tue Jun 9 17:38:51 2009 for CMSSW by  doxygen 1.5.4