文件操作 - lock.cpython-310.pyc
返回文件管理
返回主菜单
删除本文件
文件: /usr/lib/python3/dist-packages/landscape/lib/__pycache__/lock.cpython-310.pyc
编辑文件内容
o ���c� � @ s6 d dl Z d dlZd dlZG dd� de�Zddd�ZdS )� Nc @ s e Zd ZdZdS )� LockErrorz"Raised when unable to lock a file.N)�__name__� __module__�__qualname__�__doc__� r r �4/usr/lib/python3/dist-packages/landscape/lib/lock.pyr s r c s� t �| t j�� t�� tjd�}|tjO }t�� tj|� t�� } zt�� tj tj B � W n tyB |t�� | k r@td��Y nw nt� d� q!� fdd�}|S )Nr TzCouldn't obtain lockg�������?c s t �� t j� t�� � d S )N)�fcntl�flock�LOCK_UN�os�closer ��fdr r �unlock_path s zlock_path.<locals>.unlock_path)r �open�O_CREATr �F_GETFD� FD_CLOEXEC�F_SETFD�timer �LOCK_EX�LOCK_NB�IOErrorr �sleep)�path�timeout�flags�startedr r r r � lock_path s$ �� � r )r )r r r � Exceptionr r r r r r �<module> s
修改文件时间
将文件时间修改为当前时间的前一年
删除文件