2023-03-28 23:54:38 +02:00
|
|
|
#! /usr/bin/env python3
|
|
|
|
|
2023-07-17 21:05:06 +02:00
|
|
|
import os
|
|
|
|
|
2023-10-10 22:11:57 +02:00
|
|
|
import fs
|
2023-07-17 21:05:06 +02:00
|
|
|
|
2023-03-28 23:54:38 +02:00
|
|
|
|
2024-06-10 09:56:59 +02:00
|
|
|
if __name__ == "__main__":
|
2023-07-17 21:05:06 +02:00
|
|
|
file_path = os.path.realpath(__file__)
|
|
|
|
root_path = os.path.dirname(file_path)
|
2024-06-10 09:56:59 +02:00
|
|
|
directory_path = os.path.join(root_path, "tmp")
|
|
|
|
file_path = os.path.join(directory_path, "file")
|
2023-07-17 21:05:06 +02:00
|
|
|
|
2023-10-10 22:11:57 +02:00
|
|
|
fs.wipe(directory_path)
|
|
|
|
fs.make_directory(directory_path)
|
2024-06-10 09:56:59 +02:00
|
|
|
fs.write(file_path, "Martine écrit beaucoup.")
|
2023-10-10 22:11:57 +02:00
|
|
|
fs.empty_file(file_path)
|
2024-06-10 09:56:59 +02:00
|
|
|
fs.write(file_path, "Martine écrit moins.")
|