From cca66b9ec4e494c1d919bff0f71a820d8afab1fa Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 20:24:48 +0200 Subject: Adding upstream version 1.2.2. Signed-off-by: Daniel Baumann --- src/io/sys.h | 70 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 src/io/sys.h (limited to 'src/io/sys.h') diff --git a/src/io/sys.h b/src/io/sys.h new file mode 100644 index 0000000..61041e7 --- /dev/null +++ b/src/io/sys.h @@ -0,0 +1,70 @@ +// SPDX-License-Identifier: GPL-2.0-or-later +#ifndef SEEN_SYS_H +#define SEEN_SYS_H + +/* + * System abstraction utility routines + * + * Authors: + * Jon A. Cruz + * + * Copyright (C) 2004-2005 Authors + * + * Released under GNU GPL v2+, read the file 'COPYING' for more information. + */ + +#include +#include +#include +#include +#include +#include +#include + +/*##################### +## U T I L I T Y +#####################*/ + +namespace Inkscape { +namespace IO { + +void dump_fopen_call( char const *utf8name, char const *id ); + +FILE *fopen_utf8name( char const *utf8name, char const *mode ); + +int mkdir_utf8name( char const *utf8name ); + +bool file_test( char const *utf8name, GFileTest test ); + +bool file_directory_exists( char const *utf8name ); + +bool file_is_writable( char const *utf8name); + +GDir *dir_open(gchar const *utf8name, guint flags, GError **error); + +gchar *dir_read_utf8name(GDir *dir); + +gchar* locale_to_utf8_fallback( const gchar *opsysstring, + gssize len, + gsize *bytes_read, + gsize *bytes_written, + GError **error ); + +gchar* sanitizeString( gchar const * str ); + +void spawn_async_with_pipes (const std::string& working_directory, + const std::vector& argv, + Glib::SpawnFlags flags, + const sigc::slot& child_setup, + Glib::Pid* child_pid, + int* standard_input, + int* standard_output, + int* standard_error); + +Glib::ustring get_file_extension(Glib::ustring path); + +} +} + + +#endif // SEEN_SYS_H -- cgit v1.2.3