<kbd id="afajh"><form id="afajh"></form></kbd>
<strong id="afajh"><dl id="afajh"></dl></strong>
    <del id="afajh"><form id="afajh"></form></del>
        1. <th id="afajh"><progress id="afajh"></progress></th>
          <b id="afajh"><abbr id="afajh"></abbr></b>
          <th id="afajh"><progress id="afajh"></progress></th>

          GnomeVFSC語言統(tǒng)一文件系統(tǒng)接口

          聯(lián)合創(chuàng)作 · 2023-09-28 21:43

          GnomeVFS 是一個 C 語言的庫,提供了統(tǒng)一的接口用來訪問各種不同的文件系統(tǒng),支持包括:WebDAV, ftp, 本地文件系統(tǒng), gzip, bzip2, cdda 等多種文件系統(tǒng)。

          示例代碼:

          static GnomeVFSResult
          do_read (GnomeVFSMethod *method,
          GnomeVFSMethodHandle *method_handle,
          gpointer buffer,
          GnomeVFSFileSize bytes,
          GnomeVFSFileSize *bytes_read,
          GnomeVFSContext *context)
          {
          FileHandle *handle = (FileHandle *) method_handle;
          if (!handle->str) {
          /* This is the first pass, get the content string. */
          handle->str = g_strdup (handle->fnode->content);
          handle->size = handle->fnode->size;
          handle->bytes_written = 0;
          }
          if (handle->bytes_written >= handle->len) {
          /* The whole file is read, return EOF. */
          *bytes_read = 0;
          return GNOME_VFS_ERROR_EOF;
          }
          *bytes_read = MIN (bytes, handle->size - handle->bytes_written);
          memcpy (buffer, handle->str + handle->bytes_written, *bytes_read);
          handle->bytes_written += *bytes_read;
          return GNOME_VFS_OK;
          }
          瀏覽 25
          點贊
          評論
          收藏
          分享

          手機掃一掃分享

          編輯 分享
          舉報
          評論
          圖片
          表情
          推薦
          點贊
          評論
          收藏
          分享

          手機掃一掃分享

          編輯 分享
          舉報
          <kbd id="afajh"><form id="afajh"></form></kbd>
          <strong id="afajh"><dl id="afajh"></dl></strong>
            <del id="afajh"><form id="afajh"></form></del>
                1. <th id="afajh"><progress id="afajh"></progress></th>
                  <b id="afajh"><abbr id="afajh"></abbr></b>
                  <th id="afajh"><progress id="afajh"></progress></th>
                  91视频久久久久久久久久久久 | 亚洲女同在线 | 蜜桃久久av一区 免费大免费黄在线 | 亚洲黄片播放 | 影音先锋三级网站 |