File: migrating-posix.md

package info (click to toggle)
glib2.0 2.84.1-2
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 66,144 kB
  • sloc: ansic: 538,877; python: 9,624; sh: 1,572; xml: 1,482; perl: 1,222; cpp: 535; makefile: 316; javascript: 11
file content (21 lines) | stat: -rw-r--r-- 1,165 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
Title: Migrating from POSIX to GIO
SPDX-License-Identifier: LGPL-2.1-or-later
SPDX-FileCopyrightText: 2007 Matthias Clasen

# Migrating from POSIX to GIO

## Comparison of POSIX and GIO concepts

The final two entries in this table require including `gio-unix-2.0.pc` as well
as `gio-2.0.pc` in your build (or, in GIR namespace terms, `GioUnix-2.0` as well
as `Gio-2.0`).

| POSIX                 | GIO                                                         |
|-----------------------|-------------------------------------------------------------|
| `char *path`          | [iface@Gio.File]                                            |
| `struct stat *buf`    | [class@Gio.FileInfo]                                        |
| `struct statvfs *buf` | [class@Gio.FileInfo]                                        |
| `int fd`              | [class@Gio.InputStream] or [class@Gio.OutputStream]         |
| `DIR *`               | [class@Gio.FileEnumerator]                                  |
| `fstab entry`         | [`GUnixMountPoint`](../gio-unix/struct.UnixMountPoint.html) |
| `mtab entry`          | [`GUnixMountEntry`](../gio-unix/struct.UnixMountEntry.html) |