( filesystem )
Legend
| → | Has corresponding code |
| → | No direct match, but an alternative exists |
| → | No corresponding code |
| - | TODO |
| ( .. ) | Not localized |
| Example | Python pytest |
C++ GoogleTest |
Swift Testing |
Kotlin jUnit |
Bash bats |
|---|---|---|---|---|---|
| ( file_exists ) | → | - | - | - | - |
| ( directory_exists ) | os.path.isdir | - | - | - | - |
| ( temp_file ) | tempfile.NamedTemporaryFile | - | - | - | - |
| ( temp_directory ) | tempfile.TemporaryDirectory | - | - | - | - |
| ( get_file_size ) | os.path.getsize(fname) | - | - | - | - |
| ( mkdir ) | os.mkdir() | - | - | - | - |
| ( mkdir_p ) | os.makedirs(path, exist_ok=True) | - | - | - | - |
| ( rmdir ) | os.rmdir() | - | - | - | - |
| ( rmdir_p ) | os.removedirs() | - | - | - | - |
| ( rmdir_recursive ) | shutil.rmtree | - | - | - | - |
| ( copy_directory_tree ) | shutil.copytree(dir1, dir2) | - | - | - | - |
| ( chdir ) | os.chdir | - | - | - | - |
| ( current_dir ) | os.getcwd | - | - | - | - |
| ( touch_file ) | p.touch() | - | - | - | - |
| ( remove_file ) | os.remove(fname) | - | - | - | - |
| ( copy_file ) | shutil.copyfile(b, a) | - | - | - | - |
| ( move_file ) | os.rename(b, a) | - | - | - | - |