X-Git-Url: http://git.annexia.org/?p=libguestfs.git;a=blobdiff_plain;f=python%2Fguestfs.py;h=784c5671cfd5f43342a7dbe3b70ab308a991388c;hp=ad44df7f29442d8eeac3bca0b561e3a148423a41;hb=5186251f8f681f2ebb028423bb49a748861fd11e;hpb=f20854ec61eef1aea313920f0cf193a78c1a9219 diff --git a/python/guestfs.py b/python/guestfs.py index ad44df7..784c567 100644 --- a/python/guestfs.py +++ b/python/guestfs.py @@ -1958,3 +1958,20 @@ class GuestFS: """ return libguestfsmod.umask (self._o, mask) + def readdir (self, dir): + u"""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. + + This function is primarily intended for use by programs. + To get a simple list of names, use "g.ls". To get a + printable directory for human consumption, use "g.ll". + + This function returns a list of directory entries. Each + directory entry is represented as a dictionary. + """ + return libguestfsmod.readdir (self._o, dir) +