From 7fa892eca93cc1b3fd75eb9341c11f0a471970d9 Mon Sep 17 00:00:00 2001 From: Daniel Kirchner Date: Wed, 14 Mar 2018 19:15:48 +0100 Subject: Add interactive test tool isoltest. --- libdevcore/CommonIO.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'libdevcore/CommonIO.h') diff --git a/libdevcore/CommonIO.h b/libdevcore/CommonIO.h index 33769ec3..3ecdb4c3 100644 --- a/libdevcore/CommonIO.h +++ b/libdevcore/CommonIO.h @@ -37,6 +37,9 @@ std::string readFileAsString(std::string const& _file); /// Retrieve and returns the contents of standard input (until EOF). std::string readStandardInput(); +/// Retrieve and returns a character from standard input (without waiting for EOL). +int readStandardInputChar(); + /// Write the given binary data into the given file, replacing the file if it pre-exists. /// Throws exception on error. /// @param _writeDeleteRename useful not to lose any data: If set, first writes to another file in -- cgit v1.2.3 From c15cb6cc7ac68e539dd3969e614be52e9a943ec7 Mon Sep 17 00:00:00 2001 From: Daniel Kirchner Date: Thu, 5 Apr 2018 14:25:14 +0200 Subject: Prevent information about file existence outside the allowed paths to leak by mimicing boost::filesystem::weakly_canonical. --- libdevcore/CommonIO.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'libdevcore/CommonIO.h') diff --git a/libdevcore/CommonIO.h b/libdevcore/CommonIO.h index 3ecdb4c3..9ba68e74 100644 --- a/libdevcore/CommonIO.h +++ b/libdevcore/CommonIO.h @@ -25,6 +25,7 @@ #include #include +#include #include "Common.h" namespace dev @@ -57,4 +58,8 @@ std::string toString(_T const& _t) return o.str(); } +/// Partial implementation of boost::filesystem::weakly_canonical (available in boost>=1.60). +/// Should be replaced by the boost implementation as soon as support for boost<1.60 can be dropped. +boost::filesystem::path weaklyCanonicalFilesystemPath(boost::filesystem::path const &_path); + } -- cgit v1.2.3