aboutsummaryrefslogtreecommitdiff
path: root/sys/base/fs/walker.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/base/fs/walker.c')
-rw-r--r--sys/base/fs/walker.c39
1 files changed, 0 insertions, 39 deletions
diff --git a/sys/base/fs/walker.c b/sys/base/fs/walker.c
deleted file mode 100644
index 65ff391..0000000
--- a/sys/base/fs/walker.c
+++ /dev/null
@@ -1,39 +0,0 @@
-#include "internal.h"
-
-static
-void
-delete(fs·History *h)
-{
- SET_FREE(h, sys·Memory, nil);
-}
-
-int
-fs·init(fs·Walker *fs, char *path)
-{
- fs->base = fs->end = fs->path;
-
- if(!path || !path[0]){
- path = getcwd(fs->path, arrlen(fs->path));
- if (!path)
- return 1;
- fs->end += strlen(path);
- }else
- fs->end = str·copyn(fs->base, path, arrlen(fs->path));
-
- if(fs->path[0] != '/')
- fs->fd = AT_FDCWD;
-
- if(!fs->hist && !(fs->flags & fs·nolinks))
- fs->hist = calloc(1, sizeof(*fs->hist));
-
- return 0;
-}
-
-void
-fs·fini(fs·Walker *fs)
-{
- if(fs->hist){
- delete(fs->hist);
- free(fs->hist);
- }
-}