libgnomevfsmm 2.26.0
file-info.h
Go to the documentation of this file.
1// -*- c++ -*-
2// Generated by gtkmmproc -- DO NOT MODIFY!
3#ifndef _LIBGNOMEVFSMM_FILE_INFO_H
4#define _LIBGNOMEVFSMM_FILE_INFO_H
5
6
7#include <glibmm.h>
8
9/* $Id: file-info.hg,v 1.13 2005/11/16 19:50:26 murrayc Exp $ */
10// -*- C++ -*- // this is for the .hg, I realize gensig puts one in
11
12/* Copyright 2003 gnome-vfsmm Development Team
13 *
14 * This library is free software; you can redistribute it and/or
15 * modify it under the terms of the GNU Lesser General Public
16 * License as published by the Free Software Foundation; either
17 * version 2.1 of the License, or (at your option) any later version.
18 *
19 * This library is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
22 * Lesser General Public License for more details.
23 *
24 * You should have received a copy of the GNU Lesser General Public
25 * License along with this library; if not, write to the Free
26 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
27 */
28
29
30#include <libgnomevfsmm/enums.h>
31#include <libgnomevfsmm/types.h>
32
33
34namespace Gnome
35{
36
37namespace Vfs
38{
39
40//TODO: This is actually now a boxed-type, with a get_type() function.
41
43{
44 public:
45#ifndef DOXYGEN_SHOULD_SKIP_THIS
46 typedef FileInfo CppObjectType;
47 typedef GnomeVFSFileInfo BaseObjectType;
48#endif /* DOXYGEN_SHOULD_SKIP_THIS */
49
50 static Glib::RefPtr<FileInfo> create();
51
52 // For use with Glib::RefPtr<> only.
53 void reference() const;
54 void unreference() const;
55
57 GnomeVFSFileInfo* gobj();
58
60 const GnomeVFSFileInfo* gobj() const;
61
63 GnomeVFSFileInfo* gobj_copy() const;
64
65protected:
66 // Do not derive this. Gnome::Vfs::FileInfo can neither be constructed nor deleted.
68 void operator delete(void*, size_t);
69
70private:
71 // noncopyable
72 FileInfo(const FileInfo&);
73 FileInfo& operator=(const FileInfo&);
74
75
76public:
77
78
81 void clear();
82
86 Glib::ustring get_mime_type() const;
87
91 Glib::RefPtr<FileInfo> duplicate();
92
93
97 std::string get_name() const;
98
99 /* Fields which are actually valid in this structure. */
100//GnomeVFSFileInfoFields valid_fields;
101
106
111
116
117 /* These are only valid if `is_local' is TRUE (see below). */
118 //dev_t device;
119 //GnomeVFSInodeNumber inode;
120
121
125 guint get_link_count() const;
126
130 guint get_uid() const;
131
135 guint get_gid() const;
136
142
148
153 guint get_io_block_size() const;
154
158 time_t get_access_time() const;
159
163 time_t get_modification_time() const;
164
168 time_t get_creation_time() const;
169
173 std::string get_symlink_name() const;
174
179 bool is_symlink() const;
180
181
182};
183
184} // namespace Vfs
185} // namespace Gnome
186
187#ifndef DOXYGEN_SHOULD_SKIP_THIS
188namespace Glib
189{
190 RefPtr<Gnome::Vfs::FileInfo> wrap(GnomeVFSFileInfo* object, bool take_copy);
191
192 namespace Container_Helpers
193 {
198 template <>
199 struct TypeTraits< Glib::RefPtr<Gnome::Vfs::FileInfo> >
200 {
201 typedef Glib::RefPtr<Gnome::Vfs::FileInfo> CppType;
202 typedef Gnome::Vfs::FileInfo::BaseObjectType * CType;
203 typedef Gnome::Vfs::FileInfo::BaseObjectType * CTypeNonConst;
204
205 static CType to_c_type (const CppType& ptr) { return Glib::unwrap(ptr); }
206 static CType to_c_type (CType ptr) { return ptr; }
207 static CppType to_cpp_type (CType ptr)
208 {
209 return Glib::wrap(ptr, true);
210 }
211
212 static void release_c_type (CType ptr)
213 {
214 gnome_vfs_file_info_unref(const_cast<CTypeNonConst>(ptr));
215 }
216 };
217 } // namespace Container_Helpers
218} // namespace Glib
219
220#endif // DOXYGEN_SHOULD_SKIP_THIS
221
222
223namespace Gnome
224{
225
226namespace Vfs
227{
228
234bool operator==(const FileInfo& lhs, const FileInfo& rhs);
235
241bool operator!=(const FileInfo& lhs, const FileInfo& rhs);
242
243
244} // namespace Vfs
245
246} // namespace Gnome
247
248
249namespace Glib
250{
251
260 Glib::RefPtr<Gnome::Vfs::FileInfo> wrap(GnomeVFSFileInfo* object, bool take_copy = false);
261
262} // namespace Glib
263
264
265#endif /* _LIBGNOMEVFSMM_FILE_INFO_H */
266
Definition: file-info.h:43
FileFlags get_flags() const
Get the special flags of this FileInfo.
time_t get_modification_time() const
Get the modification time of this FileInfo.
time_t get_creation_time() const
Get the creation time of this FileInfo.
time_t get_access_time() const
Get the access time of this FileInfo.
guint get_uid() const
Get the user id of this FileInfo.
void reference() const
FileType get_type() const
Get the file type of this FileInfo.
guint get_io_block_size() const
Get the I/O block size of this FileInfo.
void clear()
Clears the attributes so they are ready to accept new data.
static Glib::RefPtr< FileInfo > create()
bool operator==(const FileInfo &lhs, const FileInfo &rhs)
GnomeVFSFileInfo * gobj_copy() const
Provides access to the underlying C instance. The caller is responsible for unrefing it....
Glib::RefPtr< Gnome::Vfs::FileInfo > wrap(GnomeVFSFileInfo *object, bool take_copy=false)
A Glib::wrap() method for this object.
FileSize get_size() const
Get the size of this FileInfo.
void unreference() const
const GnomeVFSFileInfo * gobj() const
Provides access to the underlying C instance.
FileSize get_block_count() const
Get the size of this FileInfo.
guint get_gid() const
Get the group id of this FileInfo.
std::string get_name() const
Get the name property of this FileInfo.
bool is_symlink() const
Find out if this FileInfo is a symbolic link.
bool operator!=(const FileInfo &lhs, const FileInfo &rhs)
Glib::RefPtr< FileInfo > duplicate()
Duplicates orig and returns it.
GnomeVFSFileInfo * gobj()
Provides access to the underlying C instance.
guint get_link_count() const
Get the link count of this FileInfo.
Glib::ustring get_mime_type() const
Retrieve MIME type from this object.
std::string get_symlink_name() const
Get the symlink name of this FileInfo.
FilePermissions get_permissions() const
Get the permissions of this FileInfo.
FilePermissions
Definition: enums.h:442
FileFlags
Definition: enums.h:374
FileType
Definition: enums.h:414
Definition: address.h:120
GnomeVFSFileSize FileSize
Definition: types.h:29
Definition: address.h:37