Файловый менеджер - Редактировать - /opt/imh-python/lib/python3.9/site-packages/fabric/contrib/__pycache__/files.cpython-39.pyc
Ðазад
a {�h�A � @ s� d Z ddlZddlZddlZddlmZ ddlmZmZm Z m Z mZmZm Z ddlmZ ddd�Zd d d �Zdd� Zd!dd�Zd"dd�Zd#dd�Zd$dd�Zd%dd�Zd&dd�Zdd� ZdS )'zF Module providing easy API for working with remote files and folders. � N)�partial)�run�sudo�hide�settings�env�put�abort)� apply_lcwdFc C s� |rt p t}d| �dd� }|rVtdd�� ||�j W d � S 1 sL0 Y ttd�dd�� ||�j W d � S 1 s�0 Y dS )a! Return True if given path exists on the current remote host. If ``use_sudo`` is True, will use `sudo` instead of `run`. `exists` will, by default, hide all output (including the run line, stdout, stderr and any warning resulting from the file not existing) in order to avoid cluttering output. You may specify ``verbose=True`` to change this behavior. .. versionchanged:: 1.13 Replaced internal use of ``test -e`` with ``stat`` for improved remote cross-platform (e.g. Windows) compatibility. zstat %s� �\ T�� warn_onlyN� everything)r r �replacer Zfailedr )�path�use_sudo�verbose�func�cmd� r ��/root/rpmbuild/BUILDROOT/imh-python39-modules-3.9.7-92.el8.x86_64/opt/imh-python/lib/python3.9/site-packages/fabric/contrib/files.py�exists s *r c C st |rt nt}d| �dd� }g ddi }}|s8td�g}t|i |��� ||�jW d � S 1 sf0 Y dS )z� Return True if the given path is a symlink on the current remote host. If ``use_sudo`` is True, will use `.sudo` instead of `.run`. `.is_link` will, by default, hide all output. Give ``verbose=True`` to change this. z test -L %sr r r Tr N)r r r r r � succeeded)r r r r r �args�kwargsr r r �is_link) s r c O s&