fileutils.h
Go to the documentation of this file.
/* Copyright (C) 2009-2021 Greenbone Networks GmbH
*
* SPDX-License-Identifier: GPL-2.0-or-later
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef _GVM_FILEUTILS_H
#define _GVM_FILEUTILS_H
#include <glib.h>
int
gvm_file_exists (const char *name);
int
gvm_file_is_executable (const char *name);
int
gvm_file_is_readable (const char *name);
int
gvm_file_check_is_dir (const char *name);
int
gvm_file_remove_recurse (const gchar *pathname);
gboolean
gvm_file_copy (const gchar *, const gchar *);
gboolean
gvm_file_move (const gchar *, const gchar *);
char *
gvm_file_as_base64 (const char *);
gchar *
gvm_export_file_name (const char *, const char *, const char *, const char *,
const char *, const char *, const char *, const char *);
#endif /* not _GVM_FILEUTILS_H */
gvm_file_remove_recurse
int gvm_file_remove_recurse(const gchar *pathname)
Recursively removes files and directories.
Definition: fileutils.c:137
gvm_file_as_base64
char * gvm_file_as_base64(const char *)
Get the content of a file in base64 format.
Definition: fileutils.c:252
gvm_file_move
gboolean gvm_file_move(const gchar *, const gchar *)
Moves a source file into a destination file.
Definition: fileutils.c:220
gvm_file_copy
gboolean gvm_file_copy(const gchar *, const gchar *)
Copies a source file into a destination file.
Definition: fileutils.c:185
gvm_export_file_name
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
gvm_file_exists
int gvm_file_exists(const char *name)
Checks whether a file or directory exists.
Definition: fileutils.c:85
gvm_file_check_is_dir
int gvm_file_check_is_dir(const char *name)
Checks whether a file is a directory or not.
Definition: fileutils.c:59
gvm_file_is_readable
int gvm_file_is_readable(const char *name)
Checks whether a file or directory exists and is readable.
Definition: fileutils.c:121
gvm_file_is_executable
int gvm_file_is_executable(const char *name)
Checks whether a file or directory exists and is executable.
Definition: fileutils.c:103