docs: Convert the migrating-posix page to Markdown

Signed-off-by: Philip Withnall <pwithnall@gnome.org>

Helps: #3037
This commit is contained in:
Philip Withnall 2023-11-23 17:57:26 +00:00
parent e2efafb857
commit 94d2265429
4 changed files with 19 additions and 27 deletions

View File

@ -61,6 +61,7 @@ content_files = [
"migrating-gdbus.md",
"migrating-gconf.md",
"migrating-gnome-vfs.md",
"migrating-posix.md",
"io-scheduler.md",
]

View File

@ -237,6 +237,7 @@ expand_content_files = [
'migrating-gconf.md',
'migrating-gdbus.md',
'migrating-gnome-vfs.md',
'migrating-posix.md',
'networking.md',
'overview.md',
'pollable-utils.md',

View File

@ -0,0 +1,17 @@
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
| 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` | [struct@Gio.UnixMountPoint] |
| `mtab entry` | [struct@Gio.UnixMountEntry] |

View File

@ -1,27 +0,0 @@
<part id="migrating">
<title>Migrating to GIO</title>
<chapter>
<title>Migrating from POSIX to GIO</title>
<table id="posix-vs-gio">
<title>Comparison of POSIX and GIO concepts</title>
<tgroup cols="2">
<thead>
<row><entry>POSIX</entry><entry>GIO</entry></row>
</thead>
<tbody>
<row><entry>char *path</entry><entry>GFile *file</entry></row>
<row><entry>struct stat *buf</entry><entry>GFileInfo *info</entry></row>
<row><entry>struct statvfs *buf</entry><entry>GFileInfo *info</entry></row>
<row><entry morerows="1">int fd</entry><entry>GInputStream *in</entry></row>
<row><entry>GOutputStream *out</entry></row>
<row><entry>DIR *</entry><entry>GFileEnumerator *enum</entry></row>
<row><entry>fstab entry</entry><entry>GUnixMountPoint *mount_point</entry></row>
<row><entry>mtab entry</entry><entry>GUnixMountEntry *mount_entry</entry></row>
</tbody>
</tgroup>
</table>
</chapter>
</part>