diff --git a/CMakeLists.txt b/CMakeLists.txt index 4102896..a217780 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -54,6 +54,7 @@ set( sources src/json_rpc_stream_connection.cpp src/json_rpc_tcp_connection.cpp src/json_rpc_tcp_server.cpp + src/json_rpc_error_object.cpp src/value.cpp src/lexical_cast.cpp src/spin_lock.cpp @@ -88,7 +89,7 @@ set( sources # src/program_options.cpp ) -add_subdirectory(vendor/libssh2-1.4.2) +#add_subdirectory(vendor/libssh2-1.4.2) setup_library( fc SOURCES ${sources} ) diff --git a/include/fc/filesystem.hpp b/include/fc/filesystem.hpp index 01c06a2..b7e5235 100644 --- a/include/fc/filesystem.hpp +++ b/include/fc/filesystem.hpp @@ -62,6 +62,7 @@ namespace fc { bool is_directory( const path& p ); bool is_regular_file( const path& p ); void create_directories( const path& p ); + path canonical( const path& p ); uint64_t file_size( const path& p ); } diff --git a/include/fc/ssh/process.hpp b/include/fc/ssh/process.hpp index cc4dbbe..fbc65dc 100644 --- a/include/fc/ssh/process.hpp +++ b/include/fc/ssh/process.hpp @@ -28,9 +28,11 @@ namespace fc { process( const process& p ); process( process&& p ); - + process(); ~process(); + bool valid()const; + /** * Blocks until the result code of the process has been returned. */ @@ -50,7 +52,6 @@ namespace fc { private: friend class client; process( client& c, const fc::string& cmd, const fc::string& pty_type = fc::string() ); - process(); fc::shared_ptr my; }; diff --git a/src/ssh.cpp b/src/ssh.cpp index eb8f6aa..fe5b9d6 100644 --- a/src/ssh.cpp +++ b/src/ssh.cpp @@ -643,6 +643,9 @@ namespace fc { namespace ssh { process::~process() {} + bool process::valid()const { + return !!my; + } /** * Blocks until the result code of the process has been returned.