Re: Subdirectory
- Posted by jimcbrown (admin) Jan 12, 2010
- 997 views
You are using the wrong version of walk_dir().
From your look_at() function, it seems you want the 4.0 version of walk_dir() in std/filesys.e not the 3.1 version in file.e
dcole said...
Hello coders,
include file.e integer a sequence myfolder --myfolder=any folder function look_at(sequence path_name, sequence entry)-- this function accepts two sequences as arguments printf(1, "%s\\%s: \n", {path_name, entry}) return 0 -- keep going end function a = walk_dir(myfolder, routine_id("look_at"), 1) --- i1 = walk_dir(st, i2, i3) -- Description: This routine will "walk" through a directory with path name given -- by st. i2 is the routine id of a routine that you supply. -- walk_dir() will call your routine once for each file and -- subdirectory in st. If i3 is non-zero (TRUE), then the -- subdirectories in st will be walked through recursively.
This prints out all files in the directory but I don't see any sub directories.
What's wrong?
Don Cole