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 #include <sys/types.h>
00027
00028 namespace PIRL
00029 {
00030
00031
00032
00034 extern const char
00035 *Files_ID;
00036
00038 extern const char
00039 FILE_PATHNAME_DELIMITER;
00040
00042 extern const char
00043 FILE_EXTENSION_DELIMITER;
00044
00045
00046
00047
00053 bool file_exists (const std::string& pathname);
00054
00065 bool file_is_readable (const std::string& pathname);
00066
00078 bool file_is_writeable (const std::string& pathname);
00079
00086 bool file_is_normal (const std::string& pathname);
00087
00094 bool file_is_directory (const std::string& pathname);
00095
00102 bool file_is_link (const std::string& pathname);
00103
00114 off_t file_size (const std::string& pathname);
00115
00123 bool file_is_absolute (const std::string& pathname);
00124
00137 std::string& clean_pathname (std::string& pathname);
00138
00153 std::string file_pathname (const std::string& filename);
00154
00172 std::string file_pathname
00173 (const std::string& directory, const std::string& filename);
00174
00184 std::string CWD ();
00185
00198 std::string file_directory (const std::string& pathname);
00199
00216 std::string file_directory_pathname (const std::string& pathname);
00217
00227 std::string file_name (const std::string& pathname);
00228
00240 std::string file_basename (const std::string& pathname);
00241
00251 std::string file_extension (const std::string& pathname);
00252
00258 std::string home_directory_pathname ();
00259
00266 std::string username ();
00267
00272 unsigned int UID ();
00273
00278 unsigned int GID ();
00279
00284 std::string hostname ();
00285
00286 }
00287 #endif