Greenbone Vulnerability Management Libraries  21.4.2
fileutils.h
Go to the documentation of this file.
1 /* Copyright (C) 2009-2021 Greenbone Networks GmbH
2  *
3  * SPDX-License-Identifier: GPL-2.0-or-later
4  *
5  * This program is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU General Public License
7  * as published by the Free Software Foundation; either version 2
8  * of the License, or (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18  */
19 
27 #ifndef _GVM_FILEUTILS_H
28 #define _GVM_FILEUTILS_H
29 
30 #include <glib.h>
31 
32 int
33 gvm_file_exists (const char *name);
34 
35 int
36 gvm_file_is_executable (const char *name);
37 
38 int
39 gvm_file_is_readable (const char *name);
40 
41 int
42 gvm_file_check_is_dir (const char *name);
43 
44 int
45 gvm_file_remove_recurse (const gchar *pathname);
46 
47 gboolean
48 gvm_file_copy (const gchar *, const gchar *);
49 
50 gboolean
51 gvm_file_move (const gchar *, const gchar *);
52 
53 char *
54 gvm_file_as_base64 (const char *);
55 
56 gchar *
57 gvm_export_file_name (const char *, const char *, const char *, const char *,
58  const char *, const char *, const char *, const char *);
59 
60 #endif /* not _GVM_FILEUTILS_H */
int gvm_file_remove_recurse(const gchar *pathname)
Recursively removes files and directories.
Definition: fileutils.c:137
char * gvm_file_as_base64(const char *)
Get the content of a file in base64 format.
Definition: fileutils.c:252
gboolean gvm_file_move(const gchar *, const gchar *)
Moves a source file into a destination file.
Definition: fileutils.c:220
gboolean gvm_file_copy(const gchar *, const gchar *)
Copies a source file into a destination file.
Definition: fileutils.c:185
gchar * gvm_export_file_name(const char *, const char *, const char *, const char *, const char *, const char *, const char *, const char *)
Generates a file name for exporting.
Definition: fileutils.c:283
int gvm_file_exists(const char *name)
Checks whether a file or directory exists.
Definition: fileutils.c:85
int gvm_file_check_is_dir(const char *name)
Checks whether a file is a directory or not.
Definition: fileutils.c:59
int gvm_file_is_readable(const char *name)
Checks whether a file or directory exists and is readable.
Definition: fileutils.c:121
int gvm_file_is_executable(const char *name)
Checks whether a file or directory exists and is executable.
Definition: fileutils.c:103