// $Id$
//
-// Copyright (C) 2008
+// Copyright (C) 2008
// Fraunhofer Institute for Open Communication Systems (FOKUS)
// Competence Center NETwork research (NET), St. Augustin, GERMANY
// Stefan Bund <g0dil@berlios.de>
// Types
/// Thrown by built-in 'exit' command
- struct ExitException {};
+ struct ExitException {};
/// Executor policy function
typedef boost::function<void (DirectoryNode &,std::string const &)> SecurityPolicy;
///////////////////////////////////////////////////////////////////////////
//\/name Structors and default members
///\{
-
+
Executor();
///\}
void execute(std::ostream & output, ParseCommandInfo const & command);
///< Execute command
- /**< Output will be written to \a output.
+ /**< Output will be written to \a output.
Same as operator()(). */
void operator()(std::ostream & output, ParseCommandInfo const & command);
///< Execute command
- /**< Output will be written to \a output.
+ /**< Output will be written to \a output.
Same as execute(). */
GenericNode & getNode(ParseCommandInfo const & command);
DirectoryNode & cwd() const; ///< Current working directory
DirectoryNode & chroot() const; ///< Get root node
/**< The root node defaults to senf::console::root(). If
changed, all path references are relative to this node
- and objects outside that tree cannot be accessed. */
+ and objects outside that tree cannot be accessed. */
Executor & chroot(DirectoryNode & node); ///< chroot into given directory
/**< After this call, all path's are interpreted relative to
std::string path;
InvalidPathException() : path() {}
InvalidPathException(std::string path_) : path(path_) {}
-
+
};
struct InvalidDirectoryException {
std::string path;
InvalidDirectoryException(std::string path_) : path(path_) {}
};
struct InvalidCommandException {};
-
+
DirectoryNode::ptr root_;
SecurityPolicy policy_;
mutable Path cwd_;