def init() -> None: """Create the necessary directories.""" global _files_directory, _info_directory _files_directory = os.path.join(xdg.user_data_dir(), "Trash/files") _info_directory = os.path.join(xdg.user_data_dir(), "Trash/info") os.makedirs(_files_directory, exist_ok=True) os.makedirs(_info_directory, exist_ok=True)
def test_backup_directories(mock_gtk_version): migration.backup() gtk_name = "vimiv-gtk-backup" for directory in ( xdg.user_config_dir(gtk_name), xdg.user_cache_dir(gtk_name), xdg.user_data_dir(gtk_name), ): assert os.path.isdir(directory)
def init() -> None: """Create the necessary directories.""" global _files_directory, _info_directory _files_directory = xdg.user_data_dir("Trash", "files") _info_directory = xdg.user_data_dir("Trash", "info") xdg.makedirs(_files_directory, _info_directory)