#!/usr/bin/env python3 import os import sys import tempfile def main(): (fd, filepath) = tempfile.mkstemp(dir=sys.argv[1]) os.unlink(filepath) found = False for entry in os.scandir(sys.argv[1]): if entry.name.startswith(".fuse_hidden"): print("found .fuse_hidden file {}".format(entry.name), end='') found = True os.close(fd) if found: return 1 return 0 if __name__ == "__main__": raise SystemExit(main())