OSDN Git Service

cache
[psychlops/cpp.git] / psychlops / core / devices / psychlops_io_file.h
1 /*
2  *  psychlops_io_file.h
3  *  Psychlops Standard Library (Universal)
4  *
5  *  Last Modified 2005/10/10 by Kenchi HOSOKAWA
6  *  (C) 2005 Kenchi HOSOKAWA, Kazushi MARUYA, Takao SATO
7  */
8
9 #ifndef HEADER_PSYCHLOPS_IO_FILE
10 #define HEADER_PSYCHLOPS_IO_FILE
11
12 \r
13 #include <string>\r
14
15
16 namespace Psychlops {
17
18
19         class File {
20                 private:\r
21                 static bool appname_initialized;
22                 public:\r
23                 enum { PATH_APP=0, PATH_RSC, PATH_HOME, PATH_SETTING, PATH_DOCUMENTS, PATH_DOCUMENTS_ROOT };
24                 struct PATH_ID_STRING {
25                         std::string path;
26                         const std::string id_string;
27                         const unsigned int id_string_length;
28                         PATH_ID_STRING(const char * id_str);
29                 };
30                 static PATH_ID_STRING STANDARD_PATH[6];\r
31                 static const char PATH_DEVIDER;
32
33                 public:
34                 static void initialize();
35                 static void initialize_appname();
36                 static std::string getCurrentDirectory();\r
37                 static void setCurrentDirectory(const std::string &path, bool force_mkdir);\r
38                 static void setCurrentDirectoryDefault();
39                 static std::string decodePath(const char * path);
40                 static std::string decodePath(const std::string &path);\r
41                 static std::string replacePathDevider(const std::string &path);
42         };
43
44
45 }       /*      <- namespace Psycholops         */
46
47
48 #endif