Logo Search packages:      
Sourcecode: paramiko version File versions  Download package

def paramiko::sftp_client::SFTPClient::utime (   self,
  path,
  times 
)

Set the access and modified times of the file specified by C{path}.  If
C{times} is C{None}, then the file's access and modified times are set
to the current time.  Otherwise, C{times} must be a 2-tuple of numbers,
of the form C{(atime, mtime)}, which is used to set the access and
modified times, respectively.  This bizarre API is mimicked from python
for the sake of consistency -- I apologize.

@param path: path of the file to modify.
@type path: string
@param times: C{None} or a tuple of (access time, modified time) in
    standard internet epoch time (seconds since 01 January 1970 GMT).
@type times: tuple of int

Definition at line 363 of file sftp_client.py.

00363                                 :
        """
        Set the access and modified times of the file specified by C{path}.  If
        C{times} is C{None}, then the file's access and modified times are set
        to the current time.  Otherwise, C{times} must be a 2-tuple of numbers,
        of the form C{(atime, mtime)}, which is used to set the access and
        modified times, respectively.  This bizarre API is mimicked from python
        for the sake of consistency -- I apologize.

        @param path: path of the file to modify.
        @type path: string
        @param times: C{None} or a tuple of (access time, modified time) in
            standard internet epoch time (seconds since 01 January 1970 GMT).
        @type times: tuple of int
        """
        path = self._adjust_cwd(path)
        if times is None:
            times = (time.time(), time.time())
        attr = SFTPAttributes()
        attr.st_atime, attr.st_mtime = times
        self._request(CMD_SETSTAT, path, attr)

    def readlink(self, path):


Generated by  Doxygen 1.6.0   Back to index