Line | |
---|
1 | /* |
---|
2 | orxonox - the future of 3D-vertical-scrollers |
---|
3 | |
---|
4 | Copyright (C) 2004 orx |
---|
5 | |
---|
6 | This program is free software; you can redistribute it and/or modify |
---|
7 | it under the terms of the GNU General Public License as published by |
---|
8 | the Free Software Foundation; either version 2, or (at your option) |
---|
9 | any later version. |
---|
10 | |
---|
11 | ### File Specific: |
---|
12 | main-programmer: Benjamin Grauer |
---|
13 | co-programmer: ... |
---|
14 | */ |
---|
15 | |
---|
16 | #include "file.h" |
---|
17 | |
---|
18 | #ifdef __unix__ |
---|
19 | #include <unistd.h> |
---|
20 | #elif __WIN32__ || _MS_DOS_ |
---|
21 | #include <dir.h> |
---|
22 | #else |
---|
23 | #include <direct.h> |
---|
24 | #endif |
---|
25 | |
---|
26 | |
---|
27 | |
---|
28 | File::File() |
---|
29 | { |
---|
30 | #warning implement |
---|
31 | } |
---|
32 | |
---|
33 | File::File(const std::string& fileName) |
---|
34 | { |
---|
35 | #warning implement |
---|
36 | } |
---|
37 | |
---|
38 | File::File(const File& file) |
---|
39 | { |
---|
40 | #warning implement |
---|
41 | } |
---|
42 | |
---|
43 | File::~File() |
---|
44 | { |
---|
45 | #warning implement |
---|
46 | } |
---|
47 | |
---|
48 | bool File::open(OpenMode mode) |
---|
49 | { |
---|
50 | #warning implement |
---|
51 | } |
---|
52 | bool File::close() |
---|
53 | { |
---|
54 | #warning implement |
---|
55 | } |
---|
56 | int File::handle() |
---|
57 | { |
---|
58 | #warning implement |
---|
59 | } |
---|
60 | |
---|
61 | bool File::exists() |
---|
62 | { |
---|
63 | #warning implement |
---|
64 | } |
---|
65 | bool File::isLink() |
---|
66 | { |
---|
67 | #warning implement |
---|
68 | } // only on UNIX |
---|
69 | bool File::isFile() |
---|
70 | { |
---|
71 | #warning implement |
---|
72 | } |
---|
73 | bool File::isDirectory() |
---|
74 | { |
---|
75 | #warning implement |
---|
76 | } |
---|
77 | bool File::isReadeable() |
---|
78 | { |
---|
79 | #warning implement |
---|
80 | } |
---|
81 | bool File::isWriteable() |
---|
82 | { |
---|
83 | #warning implement |
---|
84 | } |
---|
85 | bool File::isExecutable() |
---|
86 | { |
---|
87 | #warning implement |
---|
88 | } |
---|
89 | |
---|
90 | |
---|
91 | bool File::copy(const File& destination) |
---|
92 | { |
---|
93 | #warning implement |
---|
94 | } |
---|
95 | bool File::rename(const File& destination) |
---|
96 | { |
---|
97 | #warning implement |
---|
98 | } |
---|
99 | bool File::touch() |
---|
100 | { |
---|
101 | #warning implement |
---|
102 | } |
---|
103 | bool File::remove() |
---|
104 | { |
---|
105 | #warning implement |
---|
106 | } |
---|
107 | |
---|
108 | void File::relToAbs(std::string& fileName) |
---|
109 | { |
---|
110 | #warning implement |
---|
111 | } |
---|
112 | void File::absToRel(std::string& fileName) |
---|
113 | { |
---|
114 | #warning implement |
---|
115 | } |
---|
116 | |
---|
117 | |
---|
118 | |
---|
119 | |
---|
120 | std::string File::_cwd = ""; |
---|
121 | |
---|
122 | /** |
---|
123 | * @returns the Current Woring Directory |
---|
124 | */ |
---|
125 | const std::string& File::cwd() |
---|
126 | { |
---|
127 | if (File::_cwd.empty()) |
---|
128 | { |
---|
129 | char cwd[1024]; |
---|
130 | char* errorCode = getcwd(cwd, 1024); |
---|
131 | if (errorCode == 0) |
---|
132 | return File::_cwd; |
---|
133 | |
---|
134 | File::_cwd = cwd; |
---|
135 | } |
---|
136 | return File::_cwd; |
---|
137 | } |
---|
138 | |
---|
139 | |
---|
140 | |
---|
141 | #include "file.h" |
---|
142 | |
---|
143 | |
---|
Note: See
TracBrowser
for help on using the repository browser.