/*  BMPx - The Dumb Music Player
 *  Copyright (C) 2005 BMPx development team.
 *
 *  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.
 *
 *  $Id$
 */

#ifndef BMPX_FILE_UTILS_H
#define BMPX_FILE_UTILS_H

#include <config.h>
#include <glib.h>

typedef gboolean (*DirForeachFunc) (const gchar *path,
				    const gchar *basename,
				    gpointer     user_data);

G_BEGIN_DECLS

gchar *find_file_recursively (const gchar *dirname,
			      const gchar *file,
			      gint         depth_max);

gboolean dir_foreach (const gchar     *path,
		      DirForeachFunc   function,
		      gpointer         user_data,
		      GError         **error);

void del_directory (const gchar *dirname);

gboolean file_is_archive (const gchar *filename);

gchar *archive_decompress (const gchar *path);
gchar *archive_basename   (const gchar *path);

gboolean collect_path (const gchar  *path,
                       const gchar  *basename,
                       GList       **list);

gboolean is_audio_file (const gchar *uri);

gchar* create_glob (const gchar *suffix);
 
G_END_DECLS

#endif
