|
AndroMeta
2.0.0
|
00001 /* 00002 * Copyright 2009-2012 AndroMeta LLC. All rights reserved. 00003 * 00004 * AndroMeta LLC retains all intellectual property and proprietary 00005 * rights to this software and related documentation and any modifications 00006 * thereto. Any use, reproduction, disclosure, or distribution of this 00007 * software and related documentation without an express license agreement 00008 * from AndroMeta LLC is strictly prohibited. 00009 * 00010 */ 00011 00018 #ifndef ANDROMETA_M_SYS_H 00019 #define ANDROMETA_M_SYS_H 00020 00021 #include <AndroMeta/MStr.h> 00022 #include <AndroMeta/MVar.h> 00023 00024 namespace Meta{ 00025 00030 class MSys{ 00031 public: 00032 00036 static mvar sysInfo(); 00037 00041 static mstr hostname(); 00042 00046 static mstr joinPath(const mstr& path, const mstr& ext); 00047 00051 static mstr basename(const mstr& path); 00052 00057 static mstr parentDirectory(const mstr& path); 00058 00064 static bool makeDir(const mstr& path); 00065 00069 static mstr tempPath(); 00070 00077 static mstr tempFilePath(const mstr& extension=""); 00078 00082 static long processId(); 00083 00087 static bool exists(const mstr& path); 00088 00095 static double cpuBenchmark1(); 00096 00100 static mstr currentDir(); 00101 00111 static bool getEnv(const mstr& key, mstr& value); 00112 00126 static bool setEnv(const mstr& key, const mstr& value, bool redef=true); 00127 00133 static void setTimeZone(const mstr& zone); 00134 00140 static mstr hiddenInput(); 00141 00147 static bool rename(const mstr& sourcePath, const mstr& destPath); 00148 00154 static mstr fileExtension(const mstr& filePath); 00155 00159 static mstr normalizePath(const mstr& path); 00160 00164 static mstr stripPath(const mstr& path); 00165 }; 00166 00167 } // end namespace Meta 00168 00169 #endif // ANDROMETA_M_SYS_H
1.7.6.1