summaryrefslogtreecommitdiff
path: root/src/user/lib/fwik/io/Dir.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/user/lib/fwik/io/Dir.cpp')
-rw-r--r--src/user/lib/fwik/io/Dir.cpp37
1 files changed, 0 insertions, 37 deletions
diff --git a/src/user/lib/fwik/io/Dir.cpp b/src/user/lib/fwik/io/Dir.cpp
deleted file mode 100644
index cfcc77b..0000000
--- a/src/user/lib/fwik/io/Dir.cpp
+++ /dev/null
@@ -1,37 +0,0 @@
-#include <IO/Dir.h>
-
-Dir::Dir(const Node &n) : Node(n) {
- _init();
-}
-
-Dir::Dir(FILE f) : Node(f) {
- _init();
- if (error == E_INVALID_TYPE) libc::close(fd);
-}
-
-Dir::Dir(const char* filename, int mode) : Node(filename, mode) {
- _init();
- if (error == E_INVALID_TYPE) libc::close(fd);
-}
-
-void Dir::_init() {
- if (error < 0) return;
- pos = 0;
- if ((info.type & FT_DIR) == 0) {
- error = E_INVALID_TYPE;
- }
-}
-
-Dir::~Dir() {
-}
-
-String Dir::read_ent() {
- char buf[256];
- int l = libc::read(fd, pos, 256, buf);
- if (l > 0) {
- pos++;
- return String(buf, l);
- } else {
- return "";
- }
-}