Blame gio/glocalfileinfo.h

Packit ae235b
/* GIO - GLib Input, Output and Streaming Library
Packit ae235b
 *
Packit ae235b
 * Copyright (C) 2006-2007 Red Hat, Inc.
Packit ae235b
 *
Packit ae235b
 * This library is free software; you can redistribute it and/or
Packit ae235b
 * modify it under the terms of the GNU Lesser General Public
Packit ae235b
 * License as published by the Free Software Foundation; either
Packit ae235b
 * version 2.1 of the License, or (at your option) any later version.
Packit ae235b
 *
Packit ae235b
 * This library is distributed in the hope that it will be useful,
Packit ae235b
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit ae235b
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Packit ae235b
 * Lesser General Public License for more details.
Packit ae235b
 *
Packit ae235b
 * You should have received a copy of the GNU Lesser General
Packit ae235b
 * Public License along with this library; if not, see <http://www.gnu.org/licenses/>.
Packit ae235b
 *
Packit ae235b
 * Author: Alexander Larsson <alexl@redhat.com>
Packit ae235b
 */
Packit ae235b
Packit ae235b
#ifndef __G_LOCAL_FILE_INFO_H__
Packit ae235b
#define __G_LOCAL_FILE_INFO_H__
Packit ae235b
Packit ae235b
#include <gio/gfileinfo.h>
Packit ae235b
#include <gio/gfile.h>
Packit ae235b
#include <glib/gstdioprivate.h>
Packit ae235b
#include <sys/stat.h>
Packit ae235b
#include <sys/types.h>
Packit ae235b
Packit ae235b
G_BEGIN_DECLS
Packit ae235b
Packit ae235b
typedef struct
Packit ae235b
{
Packit ae235b
  gboolean writable;
Packit ae235b
  gboolean is_sticky;
Packit ae235b
  gboolean has_trash_dir;
Packit ae235b
  int      owner;
Packit ae235b
  dev_t    device;
Packit ae235b
  gpointer extra_data;
Packit ae235b
  GDestroyNotify free_extra_data;
Packit ae235b
} GLocalParentFileInfo;
Packit ae235b
Packit ae235b
#ifdef G_OS_WIN32
Packit ae235b
/* We want 64-bit file size, file ID and symlink support */
Packit ae235b
#define GLocalFileStat GWin32PrivateStat
Packit ae235b
#else
Packit ae235b
#define GLocalFileStat struct stat
Packit ae235b
#endif
Packit ae235b
Packit ae235b
#define G_LOCAL_FILE_INFO_NOSTAT_ATTRIBUTES \
Packit ae235b
    G_FILE_ATTRIBUTE_STANDARD_NAME "," \
Packit ae235b
    G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME "," \
Packit ae235b
    G_FILE_ATTRIBUTE_STANDARD_EDIT_NAME "," \
Packit ae235b
    G_FILE_ATTRIBUTE_STANDARD_COPY_NAME
Packit ae235b
Packit ae235b
gboolean   _g_local_file_has_trash_dir        (const char             *dirname,
Packit ae235b
                                               dev_t                   dir_dev);
Packit ae235b
#ifdef G_OS_UNIX
Packit ae235b
gboolean   _g_local_file_is_lost_found_dir    (const char             *path,
Packit ae235b
                                               dev_t                   path_dev);
Packit ae235b
#endif
Packit ae235b
void       _g_local_file_info_get_parent_info (const char             *dir,
Packit ae235b
                                               GFileAttributeMatcher  *attribute_matcher,
Packit ae235b
                                               GLocalParentFileInfo   *parent_info);
Packit ae235b
void       _g_local_file_info_free_parent_info (GLocalParentFileInfo   *parent_info);
Packit ae235b
void       _g_local_file_info_get_nostat      (GFileInfo              *info,
Packit ae235b
                                               const char             *basename,
Packit ae235b
                                               const char             *path,
Packit ae235b
                                               GFileAttributeMatcher  *attribute_matcher);
Packit ae235b
GFileInfo *_g_local_file_info_get             (const char             *basename,
Packit ae235b
                                               const char             *path,
Packit ae235b
                                               GFileAttributeMatcher  *attribute_matcher,
Packit ae235b
                                               GFileQueryInfoFlags     flags,
Packit ae235b
                                               GLocalParentFileInfo   *parent_info,
Packit ae235b
                                               GError                **error);
Packit ae235b
GFileInfo *_g_local_file_info_get_from_fd     (int                     fd,
Packit ae235b
                                               const char             *attributes,
Packit ae235b
                                               GError                **error);
Packit ae235b
char *     _g_local_file_info_create_etag     (GLocalFileStat         *statbuf);
Packit ae235b
gboolean   _g_local_file_info_set_attribute   (char                   *filename,
Packit ae235b
                                               const char             *attribute,
Packit ae235b
                                               GFileAttributeType      type,
Packit ae235b
                                               gpointer                value_p,
Packit ae235b
                                               GFileQueryInfoFlags     flags,
Packit ae235b
                                               GCancellable           *cancellable,
Packit ae235b
                                               GError                **error);
Packit ae235b
gboolean   _g_local_file_info_set_attributes  (char                   *filename,
Packit ae235b
                                               GFileInfo              *info,
Packit ae235b
                                               GFileQueryInfoFlags     flags,
Packit ae235b
                                               GCancellable           *cancellable,
Packit ae235b
                                               GError                **error);
Packit ae235b
Packit ae235b
G_END_DECLS
Packit ae235b
Packit ae235b
#endif /* __G_FILE_LOCAL_FILE_INFO_H__ */
Packit ae235b
Packit ae235b