Listing a directory using the file system session

Emery Hemingway emery at ...261...
Thu Dec 15 15:32:06 CET 2016


Hello Martijn,

The File_system client in the VFS library is the only example that I can think of
for reading directory entries. I would recommend using the VFS library rather than
using a File_system session directly, the library is easier to use and this would
give you a lot more power for free, such as merging the same directory present in
multiple File_system sessions.

https://github.com/genodelabs/genode/blob/master/repos/os/src/lib/vfs/fs_file_system.h#L279

Cheers,
Emery Hemingway

On Thu, Dec 15, 2016 at 01:42:45PM +0100, Martijn Verschoor wrote:
> Dear Genode community,
> 
> I’m looking for a way to list the files (nodes) in a directory using a file system session. Amongst other, I studied the File_system::Session and file_system/utils.h but cannot find a hook to get started. I see that reading the directory nodes is supported -> this returns the Directory_entry struct with information about the directory itself, but not about the nodes the directory contains (right?). Is there a way retrieve the latter?
> 
> Any help is appreciated!
> 
> Met vriendelijke groet / kind regards,
> 
> Martijn Verschoor
> 
> Cyber Security Labs B.V. | Gooimeer 6-31 | 1411 DD Naarden | The Netherlands
> +31 35 631 3253 (office) |  +31 616 014 087 (mobile)
> 
> 
> 
> 
> 
> 
> 
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most 
> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> _______________________________________________
> genode-main mailing list
> genode-main at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/genode-main
> 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 480 bytes
Desc: not available
URL: <http://lists.genode.org/pipermail/users/attachments/20161215/9a6ce56d/attachment.sig>


More information about the users mailing list