관리-도구
편집 파일: file_cache.cpython-36.pyc
3 �Pf� � @ sd d dl Z d dlZd dlmZ d dlmZ ddlmZ ddlm Z dd� Z G d d � d e�Zdd� ZdS ) � N)�LockFile)� MkdirLockFile� )� BaseCache)�CacheControllerc C s� t j}|t jt jB O }tt d�r*|t jO }tt d�r>|t jO }yt j| � W n tt fk rd Y nX t j | ||�}yt j|d�S t j|� � Y nX d S )N� O_NOFOLLOW�O_BINARY�wb) �os�O_WRONLY�O_CREAT�O_EXCL�hasattrr r �remove�IOError�OSError�open�fdopen�close)�filenameZfmode�flags�fd� r � /usr/lib/python3.6/file_cache.py�_secure_open_write s r c @ sB e Zd Zddd�Zedd� �Zd d � Zdd� Zd d� Zdd� Z dS )� FileCacheF� � Nc C sN |d k r|d k rt d��|r t}|d kr,t}|| _|| _|| _|| _|| _d S )Nz/Cannot use use_dir_lock and lock_class together)� ValueErrorr r � directory�forever�filemode�dirmode� lock_class)�selfr r r! r"