Utils/Console: Console UDPServer
[senf.git] / Utils / Console / Executor.hh
index 6a950f0..ba4cdce 100644 (file)
@@ -92,7 +92,9 @@ namespace console {
                                         ///< Execute command
                                         /**< Output will be written to \a output. 
                                              Same as execute(). */
+        GenericNode & getNode(ParseCommandInfo const & command);
         DirectoryNode & cwd() const;    ///< Current working directory
+        void cwd(DirectoryNode & dir);  ///< Change current directory
         std::string cwdPath() const;    ///< Return pathname of current directory
         bool skipping() const;          ///< \c true, if currently skipping a directory group
 
@@ -138,6 +140,7 @@ namespace console {
 
         void cd(ParseCommandInfo::TokensRange dir);
         void ls(std::ostream & output, ParseCommandInfo::TokensRange dir);
+        void lr(std::ostream & output, ParseCommandInfo::TokensRange dir);
         void pushd(ParseCommandInfo::TokensRange dir);
         void popd();
         void exit();
@@ -148,8 +151,17 @@ namespace console {
                                Path & dir);
         std::string complete(DirectoryNode & dir, std::string const & name);
 
-        struct InvalidPathException {};
-        struct InvalidDirectoryException {};
+        struct InvalidPathException {
+            std::string path;
+            InvalidPathException() : path() {}
+            InvalidPathException(std::string path_) : path(path_) {}
+            
+        };
+        struct InvalidDirectoryException {
+            std::string path;
+            InvalidDirectoryException() : path() {}
+            InvalidDirectoryException(std::string path_) : path(path_) {}
+        };
         struct InvalidCommandException {};
         
         DirectoryNode::ptr root_;