📄 gfileinfo.h
字号:
/* GIO - GLib Input, Output and Streaming Library * * Copyright (C) 2006-2007 Red Hat, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General * Public License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place, Suite 330, * Boston, MA 02111-1307, USA. * * Author: Alexander Larsson <alexl@redhat.com> */#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION)#error "Only <gio/gio.h> can be included directly."#endif#ifndef __G_FILE_INFO_H__#define __G_FILE_INFO_H__#include <gio/giotypes.h>G_BEGIN_DECLS#define G_TYPE_FILE_INFO (g_file_info_get_type ())#define G_FILE_INFO(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_FILE_INFO, GFileInfo))#define G_FILE_INFO_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_FILE_INFO, GFileInfoClass))#define G_IS_FILE_INFO(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_FILE_INFO))#define G_IS_FILE_INFO_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_FILE_INFO))#define G_FILE_INFO_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_FILE_INFO, GFileInfoClass))/** * GFileInfo: * * Stores information about a file system object referenced by a #GFile. **/typedef struct _GFileInfoClass GFileInfoClass;/* Common Attributes: *//** * G_FILE_ATTRIBUTE_STANDARD_TYPE: * * A key in the "standard" namespace for storing file types. * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32. * The value for this key should contain a #GFileType. **/#define G_FILE_ATTRIBUTE_STANDARD_TYPE "standard::type" /* uint32 (GFileType) *//** * G_FILE_ATTRIBUTE_STANDARD_IS_HIDDEN: * * A key in the "standard" namespace for checking if a file is hidden. * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN. **/#define G_FILE_ATTRIBUTE_STANDARD_IS_HIDDEN "standard::is-hidden" /* boolean *//** * G_FILE_ATTRIBUTE_STANDARD_IS_BACKUP: * * A key in the "standard" namespace for checking if a file is a backup file. * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN. **/#define G_FILE_ATTRIBUTE_STANDARD_IS_BACKUP "standard::is-backup" /* boolean *//** * G_FILE_ATTRIBUTE_STANDARD_IS_SYMLINK: * * A key in the "standard" namespace for checking if the file is a symlink. * Typically the actual type is something else, if we followed the symlink * to get the type. * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN. **/#define G_FILE_ATTRIBUTE_STANDARD_IS_SYMLINK "standard::is-symlink" /* boolean *//** * G_FILE_ATTRIBUTE_STANDARD_IS_VIRTUAL: * * A key in the "standard" namespace for checking if a file is virtual. * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN. **/#define G_FILE_ATTRIBUTE_STANDARD_IS_VIRTUAL "standard::is-virtual" /* boolean *//** * G_FILE_ATTRIBUTE_STANDARD_NAME: * * A key in the "standard" namespace for getting the name of the file. * The name is the on-disk filename which may not be in any known encoding, * and can thus not be generally displayed as is. * Use #G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME if you need to display the * name in a user interface. * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BYTE_STRING. **/#define G_FILE_ATTRIBUTE_STANDARD_NAME "standard::name" /* byte string *//** * G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME: * * A key in the "standard" namespace for getting the display name of the file. * A display name is guaranteed to be in UTF8 and can thus be displayed in * the UI. * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING. **/#define G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME "standard::display-name" /* string *//** * G_FILE_ATTRIBUTE_STANDARD_EDIT_NAME: * * A key in the "standard" namespace for edit name of the file. * An edit name is similar to the display name, but it is meant to be * used when you want to rename the file in the UI. The display name * might contain information you don't want in the new filename (such as * "(invalid unicode)" if the filename was in an invalid encoding). * * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING. **/#define G_FILE_ATTRIBUTE_STANDARD_EDIT_NAME "standard::edit-name" /* string *//** * G_FILE_ATTRIBUTE_STANDARD_COPY_NAME: * * A key in the "standard" namespace for getting the copy name of the file. * The copy name is an optional version of the name. If availible its always * in UTF8, and corresponds directly to the original filename (only transcoded to * UTF8). This is useful if you want to copy the file to another filesystem that * might have a different encoding. If the filename is not a valid string in the * encoding selected for the filesystem it is in then the copy name will not be set. * * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING. **/#define G_FILE_ATTRIBUTE_STANDARD_COPY_NAME "standard::copy-name" /* string *//** * G_FILE_ATTRIBUTE_STANDARD_DESCRIPTION: * * A key in the "standard" namespace for getting the description of the file. * The description is a utf8 string that describes the file, generally containing * the filename, but can also contain furter information. Example descriptions * could be "filename (on hostname)" for a remote file or "filename (in trash)" * for a file in the trash. This is useful for instance as the window title * when displaying a directory or for a bookmarks menu. * * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING. **/#define G_FILE_ATTRIBUTE_STANDARD_DESCRIPTION "standard::description" /* string *//** * G_FILE_ATTRIBUTE_STANDARD_ICON: * * A key in the "standard" namespace for getting the icon for the file. * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_OBJECT. * The value for this key should contain a #GIcon. **/#define G_FILE_ATTRIBUTE_STANDARD_ICON "standard::icon" /* object (GIcon) *//** * G_FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE: * * A key in the "standard" namespace for getting the content type of the file. * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING. * The value for this key should contain a valid content type. **/#define G_FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE "standard::content-type" /* string *//** * G_FILE_ATTRIBUTE_STANDARD_FAST_CONTENT_TYPE: * * A key in the "standard" namespace for getting the fast content type. * The fast content type isn't as reliable as the regular one, as it * only uses the filename to guess it, but it is faster to calculate than the * regular content type. * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING. * **/#define G_FILE_ATTRIBUTE_STANDARD_FAST_CONTENT_TYPE "standard::fast-content-type" /* string *//** * G_FILE_ATTRIBUTE_STANDARD_SIZE: * * A key in the "standard" namespace for getting the file's size (in bytes). * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT64. **/#define G_FILE_ATTRIBUTE_STANDARD_SIZE "standard::size" /* uint64 *//** * G_FILE_ATTRIBUTE_STANDARD_SYMLINK_TARGET: * * A key in the "standard" namespace for getting the symlink target, if the file * is a symlink. Corresponding #GFileAttributeType is * %G_FILE_ATTRIBUTE_TYPE_BYTE_STRING. **/#define G_FILE_ATTRIBUTE_STANDARD_SYMLINK_TARGET "standard::symlink-target" /* byte string *//** * G_FILE_ATTRIBUTE_STANDARD_TARGET_URI: * * A key in the "standard" namespace for getting the target URI for the file, in * the case of %G_FILE_TYPE_SHORTCUT or %G_FILE_TYPE_MOUNTABLE files. * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING. **/#define G_FILE_ATTRIBUTE_STANDARD_TARGET_URI "standard::target-uri" /* string *//** * G_FILE_ATTRIBUTE_STANDARD_SORT_ORDER: * * A key in the "standard" namespace for setting the sort order of a file. * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_INT32. * An example use would be in file managers, which would use this key * to set the order files are displayed. Files with smaller sort order * should be sorted first, and files without sort order as if sort order * was zero. **/#define G_FILE_ATTRIBUTE_STANDARD_SORT_ORDER "standard::sort-order" /* int32 *//* Entity tags, used to avoid missing updates on save *//** * G_FILE_ATTRIBUTE_ETAG_VALUE: * * A key in the "etag" namespace for getting the value of the file's * entity tag. Corresponding #GFileAttributeType is * %G_FILE_ATTRIBUTE_TYPE_STRING. **/#define G_FILE_ATTRIBUTE_ETAG_VALUE "etag::value" /* string *//* File identifier, for e.g. avoiding loops when doing recursive * directory scanning *//** * G_FILE_ATTRIBUTE_ID_FILE: * * A key in the "id" namespace for getting a file identifier. * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING. * An example use would be during listing files, to avoid recursive * directory scanning. **/#define G_FILE_ATTRIBUTE_ID_FILE "id::file" /* string *//** * G_FILE_ATTRIBUTE_ID_FILESYSTEM: * * A key in the "id" namespace for getting the file system identifier. * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING. * An example use would be during drag and drop to see if the source * and target are on the same filesystem (default to move) or not (default * to copy). **/#define G_FILE_ATTRIBUTE_ID_FILESYSTEM "id::filesystem" /* string *//* Calculated Access Rights for current user *//** * G_FILE_ATTRIBUTE_ACCESS_CAN_READ: * * A key in the "access" namespace for getting read privileges. * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN. * This attribute will be %TRUE if the user is able to read the file. **/#define G_FILE_ATTRIBUTE_ACCESS_CAN_READ "access::can-read" /* boolean *//** * G_FILE_ATTRIBUTE_ACCESS_CAN_WRITE: *
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -