Add a new "file_open_error_message()" routine in "epan/filesystem.c", to
[obnox/wireshark/wip.git] / epan / filesystem.h
index 44f51748dc77bae1709a7fdbe44e80c590d59676..1148ba1fd688e183ec6ed49efd11a0f836c80678 100644 (file)
@@ -1,22 +1,22 @@
 /* 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.
@@ -76,6 +76,12 @@ int test_for_fifo(const char *);
  */
 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,
@@ -105,4 +111,20 @@ int create_persconffile_dir(char **pf_dir_path_return);
  */
 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 */