Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #ifndef GDCMSYSTEM_H
00016 #define GDCMSYSTEM_H
00017
00018 #include "gdcmTypes.h"
00019
00020 namespace gdcm
00021 {
00022
00027 class GDCM_EXPORT System
00028 {
00029 public:
00031 static bool MakeDirectory(const char *path);
00033 static bool FileExists(const char* filename);
00035 static bool FileIsDirectory(const char* name);
00037 static bool RemoveFile(const char* source);
00038
00039
00041 static const char *GetLastSystemError();
00042
00047 static size_t FileSize(const char* filename);
00048
00051 static time_t FileTime(const char* filename);
00052
00055 static const char *GetCurrentProcessFileName();
00056
00059 static const char *GetCurrentModuleFileName();
00060
00063 static const char *GetCurrentResourcesDirectory();
00064
00065
00066
00067
00068
00070 static bool GetHardwareAddress(unsigned char addr[6]);
00071
00074 static bool GetHostName(char hostname[255]);
00075
00076
00077
00078
00079
00080
00081
00082
00084
00085
00086 static bool GetCurrentDateTime(char date[22]);
00087
00091 static bool FormatDateTime(char date[22], time_t t, long milliseconds = 0);
00092
00094 static bool ParseDateTime(time_t &timep, const char date[22]);
00095
00098 static bool ParseDateTime(time_t &timep, long &milliseconds, const char date[22]);
00099
00101 static size_t EncodeBytes(char *out, const unsigned char *data, int size);
00102
00104 static int StrCaseCmp(const char *s1, const char *s2);
00106 static int StrNCaseCmp(const char *s1, const char *s2, size_t n);
00107
00112 static const char * GetCWD();
00113
00115
00116
00117
00118
00119
00120 protected:
00121 static bool GetPermissions(const char* file, unsigned short& mode);
00122 static bool SetPermissions(const char* file, unsigned short mode);
00123
00124 private:
00125 };
00126
00127 }
00128
00129 #endif //GDCMSYSTEM_H