summaryrefslogtreecommitdiffstats
path: root/src/lib/util/csv_file.h
diff options
context:
space:
mode:
authorMarcin Siodelski <marcin@isc.org>2015-01-12 12:38:47 +0100
committerMarcin Siodelski <marcin@isc.org>2015-01-12 12:38:47 +0100
commitfbce7dd40fdc965ea439746797dcebb9cb83836e (patch)
tree84cdc2e2c9a99c8188e5f18d8625c7b87449a999 /src/lib/util/csv_file.h
parent[3671] Memfile loads leases from multiple lease files. (diff)
downloadkea-fbce7dd40fdc965ea439746797dcebb9cb83836e.tar.xz
kea-fbce7dd40fdc965ea439746797dcebb9cb83836e.zip
[3671] Added unit test for loading v6 leases from multiple files.
Also, prevented opening the optional lease files if they don't exist.
Diffstat (limited to 'src/lib/util/csv_file.h')
-rw-r--r--src/lib/util/csv_file.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/lib/util/csv_file.h b/src/lib/util/csv_file.h
index 123948f8bd..2ac2bef05f 100644
--- a/src/lib/util/csv_file.h
+++ b/src/lib/util/csv_file.h
@@ -1,4 +1,4 @@
-// Copyright (C) 2014 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2014-2015 Internet Systems Consortium, Inc. ("ISC")
//
// Permission to use, copy, modify, and/or distribute this software for any
// purpose with or without fee is hereby granted, provided that the above
@@ -320,6 +320,14 @@ public:
/// @brief Closes the CSV file.
void close();
+ /// @brief Checks if the CSV file exists.
+ ///
+ /// This method doesn't check if the existing file has a correct file
+ /// format.
+ ///
+ /// @return true if file exists, false otherwise.
+ bool exists() const;
+
/// @brief Flushes a file.
void flush() const;