|
Server : LiteSpeed System : Linux server51.dnsbootclub.com 4.18.0-553.62.1.lve.el8.x86_64 #1 SMP Mon Jul 21 17:50:35 UTC 2025 x86_64 User : nandedex ( 1060) PHP Version : 8.1.33 Disable Function : NONE Directory : /opt/cppython/lib/python3.8/site-packages/ftputil/__pycache__/ |
U
O��g� � @ sV d Z ddlZddlZddlmZ ddlZdddgZdZG dd� d�ZG d d� d�Z dS )
z}
Tools for syncing combinations of local and remote directories.
*** WARNING: This is an unfinished in-development version!
� N)�FTPHostr � LocalHost�Synceri c @ s( e Zd ZdZdd� Zdd� Zdd� ZdS ) r zt
Provide an API for local directories and files so we can use the same code
as for `FTPHost` instances.
c C s
t ||�S )zb
Return a Python file object for file name `path`, opened in mode
`mode`.
)�open)�self�path�mode� r �9/opt/cppython/lib/python3.8/site-packages/ftputil/sync.pyr $ s zLocalHost.openc C s dS )z�
Return the time shift value (see methods `set_time_shift` and
`time_shift` in class `FTPHost` for a definition). By definition, the
value is zero for local file systems.
g r )r r r r
�
time_shift, s zLocalHost.time_shiftc C s
t t|�S )N)�getattr�os)r �attrr r r
�__getattr__4 s zLocalHost.__getattr__N)�__name__�
__module__�__qualname__�__doc__r r r r r r r
r s c @ s@ e Zd ZdZdd� Zdd� Zdd� Zdd � Zd
d� Zdd
� Z dS )r ze
Control synchronization between combinations of local and remote
directories and files.
c C s || _ || _dS )a�
Init the `FTPSyncer` instance.
Each of `source` and `target` is either an `FTPHost` or a `LocalHost`
object. The source and target directories, resp. have to be set with
the `chdir` command before passing them in. The semantics is so that
the items under the source directory will show up under the target
directory after the synchronization (unless there's an error).
N)�_source�_target)r �source�targetr r r
�__init__>