Go to the documentation of this file.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
00064 bool file_is_readable (const std::string& pathname);
00065
00077 bool file_is_writeable (const std::string& pathname);
00078
00085 bool file_is_normal (const std::string& pathname);
00086
00093 bool file_is_directory (const std::string& pathname);
00094
00101 bool file_is_link (const std::string& pathname);
00102
00113 off_t file_size (const std::string& pathname);
00114
00122 bool file_is_absolute (const std::string& pathname);
00123
00136 std::string& clean_pathname (std::string& pathname);
00137
00152 std::string file_pathname (const std::string& filename);
00153
00171 std::string file_pathname
00172 (const std::string& directory, const std::string& filename);
00173
00183 std::string CWD ();
00184
00197 std::string file_directory (const std::string& pathname);
00198
00215 std::string file_directory_pathname (const std::string& pathname);
00216
00226 std::string file_name (const std::string& pathname);
00227
00239 std::string file_basename (const std::string& pathname);
00240
00250 std::string file_extension (const std::string& pathname);
00251
00257 std::string home_directory_pathname ();
00258
00265 std::string username ();
00266
00271 unsigned int UID ();
00272
00277 unsigned int GID ();
00278
00283 std::string hostname ();
00284
00285 }
00286 #endif