* Guifications - The end all, be all, toaster popup plugin * Copyright (C) 2003-2005 Gary Kramlich * 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. /* MinGW has unistd.h!!! */ # include "../gf_config.h" gf_file_copy_file(const gchar *source, const gchar *destination) { if(!(src = g_fopen(source, "rb"))) if(!(dest = g_fopen(destination, "wb"))) while((chr = fgetc(src)) != EOF) { gf_file_copy_directory(const gchar *source, const gchar *destination) { gchar *oldfile, *newfile; g_return_val_if_fail(source, FALSE); g_return_val_if_fail(destination, FALSE); dir = g_dir_open(source, 0, NULL); while((filename = g_dir_read_name(dir))) { oldfile = g_build_filename(source, filename, NULL); newfile = g_build_filename(destination, filename, NULL); gf_file_copy_file(oldfile, newfile); gf_file_remove_dir(const gchar *directory) { const gchar *file = NULL; g_return_if_fail(directory); dir = g_dir_open(directory, 0, NULL); while((file = g_dir_read_name(dir))) { path = g_build_filename(directory, file, NULL); gf_file_access(const gchar *filename, gint mode) { return _access(filename, mode); return access(filename, mode);