#ifndef DEF_FWIK_IO_NODE_H #define DEF_FWIK_IO_NODE_H #include #include #include #include #include class Term; class Dir; class Node { public: FILE fd; file_info info; int error; // will be 0 if this is a valid file descriptor Node(FILE f); Node(const char* filename, int mode); Node(FILE parent, const char* filename, int mode); virtual ~Node() {} void close(); virtual Term* as_term() { return 0; } virtual Dir* as_dir() { return 0; } }; String path_cat(const String &a, const String &b, bool trailing_slash = true); #endif