summaryrefslogtreecommitdiff
path: root/lib/isc/include
diff options
context:
space:
mode:
Diffstat (limited to 'lib/isc/include')
-rw-r--r--lib/isc/include/isc/file.h25
1 files changed, 23 insertions, 2 deletions
diff --git a/lib/isc/include/isc/file.h b/lib/isc/include/isc/file.h
index 2bb59027dc73..1ad98b3aec7a 100644
--- a/lib/isc/include/isc/file.h
+++ b/lib/isc/include/isc/file.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004, 2005, 2009 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2005, 2009, 2011 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 2000, 2001 Internet Software Consortium.
*
* Permission to use, copy, modify, and/or distribute this software for any
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: file.h,v 1.27.18.4 2009-01-19 23:46:16 tbox Exp $ */
+/* $Id: file.h,v 1.27.18.6 2011-03-05 23:47:52 tbox Exp $ */
#ifndef ISC_FILE_H
#define ISC_FILE_H 1
@@ -181,6 +181,27 @@ isc_file_isabsolute(const char *filename);
* \brief Return #ISC_TRUE if the given file name is absolute.
*/
+isc_result_t
+isc_file_isplainfile(const char *name);
+/*!<
+ * \brief Check that the file is a plain file
+ *
+ * Returns:
+ *\li #ISC_R_SUCCESS
+ * Success. The file is a plain file.
+ *\li #ISC_R_INVALIDFILE
+ * The path specified was not usable by the operating system.
+ *\li #ISC_R_FILENOTFOUND
+ * The file does not exist. This return code comes from
+ * errno=ENOENT when stat returns -1. This code is mentioned
+ * here, because in logconf.c, it is the one rcode that is
+ * permitted in addition to ISC_R_SUCCESS. This is done since
+ * the next call in logconf.c is to isc_stdio_open(), which
+ * will create the file if it can.
+ *\li #other ISC_R_* errors translated from errno
+ * These occur when stat returns -1 and an errno.
+ */
+
isc_boolean_t
isc_file_iscurrentdir(const char *filename);
/*!<