fusetoys

various hacky fuse filesystem utilities
git clone https://a3nm.net/git/fusetoys/
Log | Files | Refs | README

commit 9e56f4e90ec3b7b6c47f4b0f602562dad939723e
parent da0274e69e9cad9dc435ba3080d3e52a9f338acc
Author: Antoine Amarilli <a3nm@a3nm.net>
Date:   Sun, 20 Aug 2023 09:06:15 -0700

python3

Diffstat:
loopfs.py | 14+++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/loopfs.py b/loopfs.py @@ -61,22 +61,22 @@ class LoopFS(fuse.Fuse): def readdir(self, path, offset): path = self.sourcePath(path) myIno = os.lstat(path).st_ino - print "will yield dot" + print ("will yield dot") yield fuse.Direntry('.', ino=myIno) - print "will yield parent" + print ("will yield parent") try: parentIno = os.lstat(os.path.join(path, "..")).st_ino - print "yielded parent" + print ("yielded parent") except OSError as e: parentIno = myIno # root - print "faked parent" + print ("faked parent") yield fuse.Direntry('..', ino=parentIno) - print "will yield children" + print ("will yield children") for name in os.listdir(path): - print "yield %s" % os.path.join(path, name) + print ("yield %s" % os.path.join(path, name)) ino = os.lstat(os.path.join(path, name)).st_ino yield fuse.Direntry(name, ino=ino) - print "alldone" + print ("alldone") def readlink(self, path): return os.readlink(self.sourcePath(path))