Table of Contents
维基百科
Features
See also
KIO – an analogous KDE library
References
External links
百度百科
GNOME DEVELOPER
维基百科
GIO (Gnome Input/Output) is a library, designed to present programmers with a modern and usable interface to a virtual file system. It allows applications to access local and remote files with a single consistent API, which was designed "to overcome the shortcomings of GnomeVFS" and be "so good that developers prefer it over raw POSIX calls."[2]
GIO serves as low-level system library for the GNOME Shell/GNOME/GTK+ software stack and is being developed by The GNOME Project. It is maintained as a separate library, libgio-2.0, but it is bundled with GLib. GIO is free and open-source software subject to the requirements of the GNU Lesser General Public License.
Features
- The abstract file system model of GIO consists of a number of interfaces and base classes for I/O and files.
- There are a number of stream classes, similar to the input and output stream hierarchies that can be found in frameworks like Java.
- There are interfaces related to applications and the types of files they handle.
- There is a framework for storing and retrieving application settings.
- file type detection with xdgmime (xdg = X Desktop Group = freedesktop.org)[3]
- file monitoring with inotify[4]
- file monitoring with FAM[5]
- There is support for network programming, including name resolution, lowlevel socket APIs and highlevel client and server helper classes.
- There is support for connecting to D-Bus, sending and receiving messages, owning and watching bus names, and making objects available on the bus.
Beyond these, GIO provides facilities for file monitoring, asynchronous I/O and filename completion. In addition to the interfaces, GIO provides implementations for the local case. Implementations for various network file systems are provided by the GVfs package as loadable modules.
See also
KIO – an analogous KDE library
References
- ^ Withnall, Philip (21 January 2019). "glib 2.58.3". GNOME ftp-release (Mailing list). Retrieved 6 February 2019.
- ^ "GIO Reference Manual".
- ^ "xdgmime in GIO git".
- ^ "inotify in GIO git".
- ^ "FAM in GIO git".
External links
- GIO Reference Manual
- GIO Technical Details
百度百科
GIO是一种致力于提供现代的、易用的VFS(虚拟文件系统)API,其目标是克服GnomeVFS的缺陷和为开发者提供一种与原生态POSIX调用一样好的API。但GIO并不是POSIX API的复制,而是提供了一个高层的、以文档为中心的接口集。
GIO是GVFS的I/O库,计划用来取代Gnome-vfs。它附带glib作为一个独立的库,称为“libgio-2.0”。libgio包括文件i/o、文件类型等的抽象,同时也默认实现本地文件i/o。
GNOME DEVELOPER
GIO Reference Manual |
---|
for GIO 2.58.3 The latest version of this documentation can be found on-line at https://developer.gnome.org/gio/unstable/.
I. GIO Overview
Introduction
Writing GIO applications
Compiling GIO applications
Running GIO applications
Extending GIO
II. API Reference
File Operations
GFile — File and Directory Handling
GFileAttribute — Key-Value Paired File Attributes
GFileInfo — File Information and Attributes
GFileEnumerator — Enumerated Files Routines
GIOError — Error helper functions
GMountOperation — Object used for authentication and user interaction
File System Monitoring
GFileMonitor — File Monitor
File-related Utilities
GFilenameCompleter — Filename Completer
Asynchronous I/O
GCancellable — Thread-safe Operation Cancellation Stack
GAsyncResult — Asynchronous Function Results
GTask — Cancellable synchronous or asynchronous task and result
GIOScheduler — I/O Scheduler
GSimpleAsyncResult — Simple asynchronous results implementation
Data conversion
GConverter — Data conversion interface
GCharsetConverter — Convert between charsets
GZlibCompressor — Zlib compressor
GZlibDecompressor — Zlib decompressor
Streaming I/O
GSeekable — Stream seeking interface
GInputStream — Base class for implementing streaming input
GOutputStream — Base class for implementing streaming output
GIOStream — Base class for implementing read/write streams
GSimpleIOStream — A wrapper around an input and an output stream.
GFileInputStream — File input streaming operations
GFileOutputStream — File output streaming operations
GFileIOStream — File read and write streaming operations
GFileDescriptorBased — Interface for file descriptor based IO
GFilterInputStream — Filter Input Stream
GFilterOutputStream — Filter Output Stream
GMemoryInputStream — Streaming input operations on memory chunks
GMemoryOutputStream — Streaming output operations on memory chunks
GBufferedInputStream — Buffered Input Stream
GBufferedOutputStream — Buffered Output Stream
GDataInputStream — Data Input Stream
GDataOutputStream — Data Output Stream
GUnixInputStream — Streaming input operations for UNIX file descriptors
GUnixOutputStream — Streaming output operations for UNIX file descriptors
GWin32InputStream — Streaming input operations for Windows file handles
GWin32OutputStream — Streaming output operations for Windows file handles
GConverterInputstream — Converter Input Stream
GConverterOutputstream — Converter Output Stream
GPollableInputStream — Interface for pollable input streams
GPollableOutputStream — Interface for pollable output streams
gpollableutils — Utilities for pollable streams
File types and applications
GContentType — Platform-specific content typing
GAppInfo — Application information and launch contexts
GAppInfoMonitor — Monitor application information for changes
GDesktopAppInfo — Application information from desktop files
Volumes and Drives
GVolumeMonitor — Volume Monitor
GVolume — Volume management
GMount — Mount management
GDrive — Drive management
Unix Mounts — UNIX mounts
Icons
GIcon — Interface for icons
GFileIcon — Icons pointing to an image file
GBytesIcon — An icon stored in memory as a GBytes
GLoadableIcon — Loadable Icons
GThemedIcon — Icon theming support
GEmblemedIcon — Icon with emblems
GEmblem — An object for emblems
Failable Initialization
GInitable — Failable object initialization interface
GAsyncInitable — Asynchronously failable object initialization interface
Subprocesses
GSubprocess — Child processes
GSubprocess Launcher — Environment options for launching a child process
Low-level network support
GSocket — Low-level socket object
GDatagramBased — Low-level datagram communications interface
GInetAddress — An IPv4/IPv6 address
GInetAddressMask — An IPv4/IPv6 address mask
GSocketAddress — Abstract base class representing endpoints for socket communication
GInetSocketAddress — Internet GSocketAddress
GUnixSocketAddress — UNIX GSocketAddress
GSocketControlMessage — A GSocket control message
GUnixFDList — An object containing a set of UNIX file descriptors
GUnixFDMessage — A GSocketControlMessage containing a GUnixFDList
GCredentials — An object containing credentials
GUnixCredentialsMessage — A GSocketControlMessage containing credentials
GProxy — Interface for proxy handling
GProxyAddress — An internet address with proxy information
gnetworking.h — System networking includes
High-level network functionallity
GSocketClient — Helper for connecting to a network service
GSocketConnection — A socket connection
GUnixConnection — A UNIX domain GSocketConnection
GTcpConnection — A TCP GSocketConnection
GTcpWrapperConnection — Wrapper for non-GSocketConnection-based, GSocket-based GIOStreams
GSocketListener — Helper for accepting network client connections
GSocketService — Make it easy to implement a network service
GThreadedSocketService — A threaded GSocketService
GNetworkMonitor — Network status monitor
TLS (SSL) support
TLS Overview — TLS (aka SSL) support for GSocketConnection
GTlsCertificate — TLS certificate
GTlsConnection — TLS connection type
GTlsClientConnection — TLS client-side connection
GTlsServerConnection — TLS server-side connection
GDtlsConnection — DTLS connection type
GDtlsClientConnection — DTLS client-side connection
GDtlsServerConnection — DTLS server-side connection
GTlsBackend — TLS backend implementation
GTlsDatabase — TLS database type
GTlsFileDatabase — TLS file based database type
GTlsInteraction — Interaction with the user during TLS operations.
GTlsPassword — TLS Passwords for prompting
DNS resolution
GResolver — Asynchronous and cancellable DNS resolver
GProxyResolver — Asynchronous and cancellable network proxy resolver
GSimpleProxyResolver — Simple proxy resolver implementation
GSocketConnectable — Interface for potential socket endpoints
GSocketAddressEnumerator
GProxyAddressEnumerator
GNetworkAddress — A GSocketConnectable for resolving hostnames
GNetworkService — A GSocketConnectable for resolving SRV records
GSrvTarget — DNS SRV record target
Low-level D-Bus Support
D-Bus Utilities — Various utilities related to D-Bus
D-Bus Addresses — D-Bus connection endpoints
D-Bus Introspection Data — Node and interface description data structures
GDBusError — Mapping D-Bus errors to and from GError
GDBusMessage — D-Bus Message
GDBusConnection — D-Bus Connections
GDBusMethodInvocation — Object for handling remote calls
GDBusServer — Helper for accepting connections
GDBusAuthObserver — Object used for authenticating connections
High-level D-Bus Support
Owning Bus Names — Simple API for owning bus names
Watching Bus Names — Simple API for watching bus names
GDBusInterface — Base type for D-Bus interfaces
GDBusInterfaceSkeleton — Service-side D-Bus interface
GDBusProxy — Client-side D-Bus interface proxy
GDBusObject — Base type for D-Bus objects
GDBusObjectSkeleton — Service-side D-Bus object
GDBusObjectProxy — Client-side D-Bus object
GDBusObjectManager — Base type for D-Bus object managers
GDBusObjectManagerServer — Service-side object manager
GDBusObjectManagerClient — Client-side object manager
Settings
GSettings — High-level API for application settings
GSettingsBackend — Interface for settings backend implementations
GSettingsSchema, GSettingsSchemaSource — Introspecting and controlling the loading of GSettings schemas
Resources
GResource — Resource framework
Permissions
GPermission — An object representing the permission to perform a certain action
GSimplePermission — A GPermission that doesn't change value
Data Models
GListModel — An interface describing a dynamic list of objects
GListStore — A simple implementation of GListModel
Win32 registry support
GWin32RegistryKey — W32 registry access helper
Application support
GApplication — Core application class
GApplicationCommandLine — A command-line invocation of an application
GActionGroup — A group of actions
GActionMap — Interface for action containers
GSimpleActionGroup — A simple GActionGroup implementation
GAction — An action interface
GSimpleAction — A simple GAction implementation
GPropertyAction — A GAction reflecting a GObject property
GRemoteActionGroup — A GActionGroup that interacts with other processes
GActionGroup exporter — Export GActionGroups on D-Bus
GDBusActionGroup — A D-Bus GActionGroup implementation
GMenuModel — An abstract class representing the contents of a menu
GMenu — A simple implementation of GMenuModel
GMenuModel exporter — Export GMenuModels on D-Bus
GDBusMenuModel — A D-Bus GMenuModel implementation
GNotification — User Notifications (pop up messages)
Extending GIO
GVfs — Virtual File System
GIOModule — Loadable GIO Modules
Extension Points — Extension Points
GIO Tools
gio-querymodules — GIO module cache creation
gsettings — GSettings configuration tool
glib-compile-schemas — GSettings schema compiler
glib-compile-resources — GLib resource compiler
gdbus — Tool for working with D-Bus objects
gdbus-codegen — D-Bus code and documentation generator
gresource — GResource tool
gapplication — D-Bus application launcher
gio — GIO commandline tool
GIO Testing
GTestDBus — D-Bus testing helper
III. Migrating to GIO
Migrating from GnomeVFS to GIO
Trash handling
Operations on multiple files
Mime monitoring
Migrating from GConf to GSettings
Before you start
Conceptual differences
GConfClient (and GConfBridge) API conversion
Change notification
Change sets
Schema conversion
Data conversion
Migrating to GDBus
Conceptual differences
API comparison
Owning bus names
Creating proxies for well-known names
Using gdbus-codegen
Object Hierarchy
Index
Annotation Glossary
Generated by GTK-Doc V1.29.1