diff options
Diffstat (limited to 'subplot')
-rw-r--r-- | subplot/data.py | 7 | ||||
-rw-r--r-- | subplot/data.yaml | 3 |
2 files changed, 10 insertions, 0 deletions
diff --git a/subplot/data.py b/subplot/data.py index 3833f2e..d134e5f 100644 --- a/subplot/data.py +++ b/subplot/data.py @@ -29,6 +29,13 @@ def create_fifo(ctx, filename=None): os.mkfifo(filename) +def create_cachedir_tag_in(ctx, dirpath=None): + filepath = f"{dirpath}/CACHEDIR.TAG" + logging.debug(f"creating {filepath}") + os.makedirs(dirpath, exist_ok=True) + open(filepath, "w").write("Signature: 8a477f597d28d172789f06886806bc55") + + def create_nonutf8_filename(ctx, dirname=None): filename = "\x88" os.mkdir(dirname) diff --git a/subplot/data.yaml b/subplot/data.yaml index 699c5b1..dcc6807 100644 --- a/subplot/data.yaml +++ b/subplot/data.yaml @@ -10,6 +10,9 @@ - given: "a named pipe {filename}" function: create_fifo +- given: a cache directory tag in {dirpath} + function: create_cachedir_tag_in + - given: "a file in {dirname} with a non-UTF8 filename" function: create_nonutf8_filename |