Python/pathlib/Path/touch

من موسوعة حسوب
اذهب إلى التنقل اذهب إلى البحث

التابع Path.touch

Create a file at this given path. If mode is given, it is combined with the process’ umask value to determine the file mode and access flags. If the file already exists, the function succeeds if exist_ok is true (and its modification time is updated to the current time), otherwise FileExistsError is raised.