mergerfs/tests/TEST_unlink_rename
2019-05-16 14:40:30 -04:00

15 lines
226 B
Python
Executable File

#!/usr/bin/env python3
import os
import sys
import tempfile
(srcfd,src) = tempfile.mkstemp(dir=sys.argv[1])
(tgtfd,tgt) = tempfile.mkstemp(dir=sys.argv[1])
os.unlink(tgt)
os.rename(src,tgt)
os.close(srcfd)
os.close(tgtfd)