bygfoot/src/file.h

119 lines
2.8 KiB
C
Raw Normal View History

2005-10-20 17:45:00 +02:00
/*
2005-11-26 17:52:51 +01:00
file.h
2005-10-20 17:45:00 +02:00
Bygfoot Football Manager -- a small and simple GTK2-based
football management game.
http://bygfoot.sourceforge.net
Copyright (C) 2005 Gyözö Both (gyboth@bygfoot.com)
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 Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
2004-12-23 13:58:39 +01:00
#ifndef FILE_H
#define FILE_H
#include "bygfoot.h"
2005-01-09 21:21:22 +01:00
#include "player_struct.h"
#include "user_struct.h"
2005-07-18 18:18:39 +02:00
#ifdef G_OS_UNIX
#define file_mkdir(dirname) mkdir(dirname, (S_IRUSR | S_IWUSR | S_IXUSR))
#else
#define file_mkdir(dirname) mkdir(dirname)
#endif
void
file_add_support_directory_recursive (const gchar *directory);
gchar*
2005-04-09 21:18:28 +02:00
file_find_support_file (const gchar *filename, gboolean warning);
gboolean
file_get_next_opt_line(FILE *fil, gchar *opt_name, gchar *opt_value);
2004-12-23 13:58:39 +01:00
2005-04-04 12:36:04 +02:00
void
file_load_opt_file(const gchar *filename, OptionList *optionlist);
void
file_save_opt_file(const gchar *filename, OptionList *optionlist);
2004-12-23 13:58:39 +01:00
GPtrArray*
2005-04-04 12:36:04 +02:00
file_dir_get_contents(const gchar *dir_name, const gchar *prefix, const gchar *suffix);
2004-12-23 13:58:39 +01:00
gboolean
2005-01-09 21:21:22 +01:00
file_my_fopen(const gchar *filename, gchar *bits, FILE **fil, gboolean abort_program);
2005-04-09 21:18:28 +02:00
GPtrArray*
file_get_country_files(void);
2005-04-04 12:36:04 +02:00
2005-01-09 21:21:22 +01:00
void
2005-04-04 12:36:04 +02:00
file_load_conf_files(void);
2005-01-09 21:21:22 +01:00
void
2005-04-04 12:36:04 +02:00
file_load_user_conf_file(User *user);
2005-01-09 21:21:22 +01:00
2006-02-15 13:03:48 +01:00
gboolean
2005-04-04 12:36:04 +02:00
file_check_home_dir(void);
void
2006-02-15 13:03:48 +01:00
file_check_home_dir_get_conf_files(GPtrArray **files_to_copy);
void
file_check_home_dir_get_definition_files(GPtrArray **files_to_copy);
2005-01-09 21:21:22 +01:00
void
2006-02-15 13:03:48 +01:00
file_check_home_dir_get_definition_dir(const gchar *dirname, const gchar *basename,
GPtrArray **files_to_copy);
2005-04-04 12:36:04 +02:00
2005-04-20 19:56:31 +02:00
void
2006-02-15 13:03:48 +01:00
file_check_home_dir_copy_files(GPtrArray **files_to_copy);
2005-04-20 19:56:31 +02:00
2005-04-04 12:36:04 +02:00
gboolean
file_my_system(const GString *command);
2005-04-04 12:36:04 +02:00
const gchar*
file_get_first_support_dir(void);
2004-12-23 13:58:39 +01:00
2005-11-02 22:04:19 +01:00
const gchar*
file_get_first_support_dir_suffix(const gchar *suffix);
void
2005-04-04 12:36:04 +02:00
file_compress_files(const gchar *destfile, const gchar *prefix);
void
2005-04-04 12:36:04 +02:00
file_decompress(const gchar *filename);
2005-07-18 18:18:39 +02:00
void
file_remove_files(const GString *files);
2005-07-18 18:18:39 +02:00
void
file_copy_file(const gchar *source_file, const gchar *dest_file);
2006-02-15 13:03:48 +01:00
void
file_get_bygfoot_dir(gchar *dir);
2006-02-21 11:20:20 +01:00
void
file_load_hints_file(void);
2008-12-17 15:39:10 +01:00
gchar*
file_load_text_from_saves(const gchar *filename);
void
file_store_text_in_saves(const gchar *filename, const gchar *text);
2004-12-23 13:58:39 +01:00
#endif