mirror of
https://github.com/trapexit/mergerfs.git
synced 2024-11-22 10:48:30 +08:00
20 lines
353 B
Plaintext
20 lines
353 B
Plaintext
|
#!/usr/bin/env python3
|
||
|
|
||
|
import os
|
||
|
import sys
|
||
|
import tempfile
|
||
|
|
||
|
(fd,filepath) = tempfile.mkstemp(dir=sys.argv[1])
|
||
|
|
||
|
ino = os.fstat(fd).st_ino
|
||
|
|
||
|
os.unlink(filepath)
|
||
|
|
||
|
for entry in os.scandir(sys.argv[1]):
|
||
|
if entry.inode() == ino:
|
||
|
print("found .fuse_hidden file {}".format(entry.name),end='')
|
||
|
os.close(fd)
|
||
|
sys.exit(1)
|
||
|
|
||
|
os.close(fd)
|