00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef _Files_
00023 #define _Files_
00024
00025 #include <string>
00026
00027 namespace PIRL
00028 {
00029
00030
00031
00033 extern const char
00034 *Files_ID;
00035
00037 extern const char
00038 FILE_PATHNAME_DELIMITER;
00039
00041 extern const char
00042 FILE_EXTENSION_DELIMITER;
00043
00044
00045
00046
00052 bool file_exists (const std::string& pathname);
00053
00062 bool file_is_readable (const std::string& pathname);
00063
00072 bool file_is_writeable (const std::string& pathname);
00073
00080 bool file_is_normal (const std::string& pathname);
00081
00088 bool file_is_directory (const std::string& pathname);
00089
00096 bool file_is_link (const std::string& pathname);
00097
00105 off_t file_size (const std::string& pathname);
00106
00114 bool file_is_absolute (const std::string& pathname);
00115
00127 std::string& clean_pathname (std::string& pathname);
00128
00143 std::string file_pathname (const std::string& filename);
00144
00162 std::string file_pathname
00163 (const std::string& directory, const std::string& filename);
00164
00174 std::string CWD ();
00175
00188 std::string file_directory (const std::string& pathname);
00189
00206 std::string file_directory_pathname (const std::string& pathname);
00207
00217 std::string file_name (const std::string& pathname);
00218
00230 std::string file_basename (const std::string& pathname);
00231
00241 std::string file_extension (const std::string& pathname);
00242
00247 std::string home_directory_pathname ();
00248
00253 std::string username ();
00254
00259 unsigned int UID ();
00260
00265 unsigned int GID ();
00266
00271 std::string hostname ();
00272
00273 }
00274 #endif