1 /*
2 * Copyright 2015 Red Hat, Inc.
3 *
4 * SPDX-License-Identifier: LGPL-2.1-or-later
5 *
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
10 *
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, see <http://www.gnu.org/licenses/>.
18 *
19 * Author: Matthias Clasen <mclasen@redhat.com>
20 */
21
22 #ifndef __GIO_TOOL_H__
23 #define __GIO_TOOL_H__
24
25 void print_error (const gchar *format,
26 ...) G_GNUC_PRINTF (1, 2);
27 void print_file_error (GFile *file,
28 const gchar *message);
29 void show_help (GOptionContext *context,
30 const char *message);
31
32 const char *file_type_to_string (GFileType type);
33 const char *attribute_type_to_string (GFileAttributeType type);
34 GFileAttributeType attribute_type_from_string (const char *str);
35 char *attribute_flags_to_string (GFileAttributeInfoFlags flags);
36
37 gboolean file_is_dir (GFile *file);
38
39 int handle_cat (int argc, char *argv[], gboolean do_help);
40 int handle_copy (int argc, char *argv[], gboolean do_help);
41 int handle_info (int argc, char *argv[], gboolean do_help);
42 int handle_launch (int argc, char *argv[], gboolean do_help);
43 int handle_list (int argc, char *argv[], gboolean do_help);
44 int handle_mime (int argc, char *argv[], gboolean do_help);
45 int handle_mkdir (int argc, char *argv[], gboolean do_help);
46 int handle_monitor (int argc, char *argv[], gboolean do_help);
47 int handle_mount (int argc, char *argv[], gboolean do_help);
48 int handle_move (int argc, char *argv[], gboolean do_help);
49 int handle_open (int argc, char *argv[], gboolean do_help);
50 int handle_rename (int argc, char *argv[], gboolean do_help);
51 int handle_remove (int argc, char *argv[], gboolean do_help);
52 int handle_save (int argc, char *argv[], gboolean do_help);
53 int handle_set (int argc, char *argv[], gboolean do_help);
54 int handle_trash (int argc, char *argv[], gboolean do_help);
55 int handle_tree (int argc, char *argv[], gboolean do_help);
56
57 #endif /* __GIO_TOOL_H__ */