read directories entries
This returns the list of directory entries in directory dir
.
All entries in the directory are returned, including "." and "..". The entries are *not* sorted, but returned in the same order as the underlying filesystem.
Also this call returns basic file type information about each file. The ftyp
field will contain one of the following
characters:
'b' Block special
'c' Char special
'd' Directory
'f' FIFO (named pipe)
'l' Symbolic link
'r' Regular file
's' Socket
'u' Unknown file type
'?' The readdir(3) call returned a d_type
field with an unexpected value
This function is primarily intended for use by programs. To get a simple list of names, use ls. To get a printable directory for human consumption, use ll.
this |
A GuestfsSession object |
an array of Dirent objects, or NULL on error |