00001
00002
00003 #ifndef _LIBGNOMEVFSMM_FILE_INFO_H
00004 #define _LIBGNOMEVFSMM_FILE_INFO_H
00005
00006 #include <glibmm.h>
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029 #include <libgnomevfsmm/enums.h>
00030 #include <libgnomevfsmm/types.h>
00031
00032
00033 namespace Gnome
00034 {
00035
00036 namespace Vfs
00037 {
00038
00039
00040
00041 class FileInfo
00042 {
00043 public:
00044 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00045 typedef FileInfo CppObjectType;
00046 typedef GnomeVFSFileInfo BaseObjectType;
00047 #endif
00048
00049 static Glib::RefPtr<FileInfo> create();
00050
00051
00052 void reference() const;
00053 void unreference() const;
00054
00056 GnomeVFSFileInfo* gobj();
00057
00059 const GnomeVFSFileInfo* gobj() const;
00060
00062 GnomeVFSFileInfo* gobj_copy() const;
00063
00064 protected:
00065
00066 FileInfo();
00067 void operator delete(void*, size_t);
00068
00069 private:
00070
00071 FileInfo(const FileInfo&);
00072 FileInfo& operator=(const FileInfo&);
00073
00074
00075 public:
00076
00077
00080 void clear();
00081
00085 Glib::ustring get_mime_type() const;
00086
00090 Glib::RefPtr<FileInfo> duplicate();
00091
00092
00096 std::string get_name() const;
00097
00098
00099
00100
00104 FileType get_type() const;
00105
00109 FilePermissions get_permissions() const;
00110
00114 FileFlags get_flags() const;
00115
00116
00117
00118
00119
00120
00124 guint get_link_count() const;
00125
00129 guint get_uid() const;
00130
00134 guint get_gid() const;
00135
00140 FileSize get_size() const;
00141
00146 FileSize get_block_count() const;
00147
00152 guint get_io_block_size() const;
00153
00157 time_t get_access_time() const;
00158
00162 time_t get_modification_time() const;
00163
00167 time_t get_creation_time() const;
00168
00172 std::string get_symlink_name() const;
00173
00178 bool is_symlink() const;
00179
00180
00181 };
00182
00183 }
00184 }
00185
00186
00187 namespace Gnome
00188 {
00189
00190 namespace Vfs
00191 {
00192
00198 bool operator==(const FileInfo& lhs, const FileInfo& rhs);
00199
00205 bool operator!=(const FileInfo& lhs, const FileInfo& rhs);
00206
00207
00208 }
00209
00210 }
00211
00212
00213 namespace Glib
00214 {
00215
00221 Glib::RefPtr<Gnome::Vfs::FileInfo> wrap(GnomeVFSFileInfo* object, bool take_copy = false);
00222
00223 }
00224
00225 #endif
00226