/* filesystem.h
* Filesystem utility definitions
*
- * $Id: filesystem.h,v 1.11 2002/06/23 21:33:09 guy Exp $
+ * $Id: filesystem.h,v 1.16 2004/01/24 01:44:29 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
* Copyright 1998 Gerald Combs
- *
+ *
* 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.
*/
const char *get_datafile_dir(void);
+/*
+ * Construct the path name of a global configuration file, given the
+ * file name.
+ */
+extern char *get_datafile_path(const char *filename);
+
/*
* Get the directory in which files that, at least on UNIX, are
* system files (such as "/etc/ethers") are stored; on Windows,
*/
char *get_persconffile_path(const char *filename, gboolean for_writing);
+/*
+ * Construct the path name of a file in $TMP/%TEMP% directory.
+ * Or "/tmp/<filename>" (C:\<filename>) if that fails.
+ *
+ * Return value is malloced so the caller should free it.
+ */
+extern char *get_tempfile_path(const char *filename);
+
+/* Delete a file */
+gboolean deletefile (const char *path);
+
+/*
+ * Return an error message for UNIX-style errno indications.
+ */
+char *file_open_error_message(int err, gboolean for_writing);
+
#endif /* FILESYSTEM_H */