|
ILIAS
release_5-4 Revision v5.4.26-12-gabc799a52e6
|
Inheritance diagram for phpseclib\Net\SFTP:
Collaboration diagram for phpseclib\Net\SFTP:Public Member Functions | |
| __construct ($host, $port=22, $timeout=10) | |
| Default Constructor. More... | |
| login ($username) | |
| Login. More... | |
| disableStatCache () | |
| Disable the stat cache. More... | |
| enableStatCache () | |
| Enable the stat cache. More... | |
| clearStatCache () | |
| Clear the stat cache. More... | |
| pwd () | |
| Returns the current directory name. More... | |
| _logError ($response, $status=-1) | |
| Logs errors. More... | |
| _realpath ($path) | |
| Canonicalize the Server-Side Path Name. More... | |
| chdir ($dir) | |
| Changes the current directory. More... | |
| nlist ($dir='.', $recursive=false) | |
| Returns a list of files in the given directory. More... | |
| _nlist_helper ($dir, $recursive, $relativeDir) | |
| Helper method for nlist. More... | |
| rawlist ($dir='.', $recursive=false) | |
| Returns a detailed list of files in the given directory. More... | |
| _list ($dir, $raw=true) | |
| Reads a list, be it detailed or not, of files in the given directory. More... | |
| _comparator ($a, $b) | |
| Compares two rawlist entries using parameters set by setListOrder() More... | |
| setListOrder () | |
| Defines how nlist() and rawlist() will be sorted - if at all. More... | |
| size ($filename) | |
| Returns the file size, in bytes, or false, on failure. More... | |
| _update_stat_cache ($path, $value) | |
| Save files / directories to cache. More... | |
| _remove_from_stat_cache ($path) | |
| Remove files / directories from cache. More... | |
| _query_stat_cache ($path) | |
| Checks cache for path. More... | |
| stat ($filename) | |
| Returns general information about a file. More... | |
| lstat ($filename) | |
| Returns general information about a file or symbolic link. More... | |
| _stat ($filename, $type) | |
| Returns general information about a file or symbolic link. More... | |
| truncate ($filename, $new_size) | |
| Truncates a file to a given length. More... | |
| touch ($filename, $time=null, $atime=null) | |
| Sets access and modification time of file. More... | |
| chown ($filename, $uid, $recursive=false) | |
| Changes file or directory owner. More... | |
| chgrp ($filename, $gid, $recursive=false) | |
| Changes file or directory group. More... | |
| chmod ($mode, $filename, $recursive=false) | |
| Set permissions on a file. More... | |
| _setstat ($filename, $attr, $recursive) | |
| Sets information about a file. More... | |
| _setstat_recursive ($path, $attr, &$i) | |
| Recursively sets information on directories on the SFTP server. More... | |
| readlink ($link) | |
| Return the target of a symbolic link. More... | |
| symlink ($target, $link) | |
| Create a symlink. More... | |
| mkdir ($dir, $mode=-1, $recursive=false) | |
| Creates a directory. More... | |
| _mkdir_helper ($dir, $attr) | |
| Helper function for directory creation. More... | |
| rmdir ($dir) | |
| Removes a directory. More... | |
| put ($remote_file, $data, $mode=self::SOURCE_STRING, $start=-1, $local_start=-1, $progressCallback=null) | |
| Uploads a file to the SFTP server. More... | |
| _read_put_responses ($i) | |
| Reads multiple successive SSH_FXP_WRITE responses. More... | |
| _close_handle ($handle) | |
| Close handle. More... | |
| get ($remote_file, $local_file=false, $offset=0, $length=-1) | |
| Downloads a file from the SFTP server. More... | |
| delete ($path, $recursive=true) | |
| Deletes a file on the SFTP server. More... | |
| _delete_recursive ($path, &$i) | |
| Recursively deletes directories on the SFTP server. More... | |
| file_exists ($path) | |
| Checks whether a file or directory exists. More... | |
| is_dir ($path) | |
| Tells whether the filename is a directory. More... | |
| is_file ($path) | |
| Tells whether the filename is a regular file. More... | |
| is_link ($path) | |
| Tells whether the filename is a symbolic link. More... | |
| fileatime ($path) | |
| Gets last access time of file. More... | |
| filemtime ($path) | |
| Gets file modification time. More... | |
| fileperms ($path) | |
| Gets file permissions. More... | |
| fileowner ($path) | |
| Gets file owner. More... | |
| filegroup ($path) | |
| Gets file group. More... | |
| filesize ($path) | |
| Gets file size. More... | |
| filetype ($path) | |
| Gets file type. More... | |
| _get_stat_cache_prop ($path, $prop) | |
| Return a stat properity. More... | |
| _get_lstat_cache_prop ($path, $prop) | |
| Return an lstat properity. More... | |
| _get_xstat_cache_prop ($path, $prop, $type) | |
| Return a stat or lstat properity. More... | |
| rename ($oldname, $newname) | |
| Renames a file or a directory on the SFTP server. More... | |
| _parseAttributes (&$response) | |
| Parse Attributes. More... | |
| _parseMode ($mode) | |
| Attempt to identify the file type. More... | |
| _parseLongname ($longname) | |
| Parse Longname. More... | |
| _send_sftp_packet ($type, $data) | |
| Sends SFTP Packets. More... | |
| _get_sftp_packet () | |
| Receives SFTP Packets. More... | |
| getSFTPLog () | |
| Returns a log of the packets that have been sent and received. More... | |
| getSFTPErrors () | |
| Returns all errors. More... | |
| getLastSFTPError () | |
| Returns the last error. More... | |
| getSupportedVersions () | |
| Get supported SFTP versions. More... | |
| _disconnect ($reason) | |
| Disconnect. More... | |
Public Member Functions inherited from phpseclib\Net\SSH2 | |
| __construct ($host, $port=22, $timeout=10) | |
| Default Constructor. More... | |
| setCryptoEngine ($engine) | |
| Set Crypto Engine Mode. More... | |
| _connect () | |
| Connect to an SSHv2 server. More... | |
| _generate_identifier () | |
| Generates the SSH identifier. More... | |
| _key_exchange ($kexinit_payload_server) | |
| Key Exchange. More... | |
| _encryption_algorithm_to_key_size ($algorithm) | |
| Maps an encryption algorithm name to the number of key bytes. More... | |
| _encryption_algorithm_to_crypt_instance ($algorithm) | |
| Maps an encryption algorithm name to an instance of a subclass of \phpseclib\Crypt\Base. More... | |
| login ($username) | |
| Login. More... | |
| _login ($username) | |
| Login Helper. More... | |
| _login_helper ($username, $password=null) | |
| Login Helper. More... | |
| _keyboard_interactive_login ($username, $password) | |
| Login via keyboard-interactive authentication. More... | |
| _keyboard_interactive_process () | |
| Handle the keyboard-interactive requests / responses. More... | |
| _ssh_agent_login ($username, $agent) | |
| Login with an ssh-agent provided key. More... | |
| _privatekey_login ($username, $privatekey) | |
| Login with an RSA private key. More... | |
| setTimeout ($timeout) | |
| Set Timeout. More... | |
| getStdError () | |
| Get the output from stdError. More... | |
| exec ($command, $callback=null) | |
| Execute Command. More... | |
| _initShell () | |
| Creates an interactive shell. More... | |
| _get_interactive_channel () | |
| Return the channel to be used with read() / write() More... | |
| _get_open_channel () | |
| Return an available open channel. More... | |
| read ($expect='', $mode=self::READ_SIMPLE) | |
| Returns the output of an interactive shell. More... | |
| write ($cmd) | |
| Inputs a command into an interactive shell. More... | |
| startSubsystem ($subsystem) | |
| Start a subsystem. More... | |
| stopSubsystem () | |
| Stops a subsystem. More... | |
| reset () | |
| Closes a channel. More... | |
| isTimeout () | |
| Is timeout? More... | |
| disconnect () | |
| Disconnect. More... | |
| __destruct () | |
| Destructor. More... | |
| isConnected () | |
| Is the connection still active? More... | |
| isAuthenticated () | |
| Have you successfully been logged in? More... | |
| _get_binary_packet () | |
| Gets Binary Packets. More... | |
| _filter ($payload) | |
| Filter Binary Packets. More... | |
| enableQuietMode () | |
| Enable Quiet Mode. More... | |
| disableQuietMode () | |
| Disable Quiet Mode. More... | |
| isQuietModeEnabled () | |
| Returns whether Quiet Mode is enabled or not. More... | |
| enablePTY () | |
| Enable request-pty when using exec() More... | |
| disablePTY () | |
| Disable request-pty when using exec() More... | |
| isPTYEnabled () | |
| Returns whether request-pty is enabled or not. More... | |
| _get_channel_packet ($client_channel, $skip_extended=false) | |
| Gets channel data. More... | |
| _send_binary_packet ($data, $logged=null) | |
| Sends Binary Packets. More... | |
| _append_log ($message_number, $message) | |
| Logs data packets. More... | |
| _send_channel_packet ($client_channel, $data) | |
| Sends channel data. More... | |
| _close_channel ($client_channel, $want_reply=false) | |
| Closes and flushes a channel. More... | |
| _disconnect ($reason) | |
| Disconnect. More... | |
| _string_shift (&$string, $index=1) | |
| String Shift. More... | |
| _define_array () | |
| Define Array. More... | |
| getLog () | |
| Returns a log of the packets that have been sent and received. More... | |
| _format_log ($message_log, $message_number_log) | |
| Formats a log for printing. More... | |
| _format_log_helper ($matches) | |
| Helper function for _format_log. More... | |
| _on_channel_open () | |
| Helper function for agent->_on_channel_open() More... | |
| _array_intersect_first ($array1, $array2) | |
| Returns the first value of the intersection of two arrays or false if the intersection is empty. More... | |
| getErrors () | |
| Returns all errors. More... | |
| getLastError () | |
| Returns the last error. More... | |
| getServerIdentification () | |
| Return the server identification. More... | |
| getKexAlgorithms () | |
| Return a list of the key exchange algorithms the server supports. More... | |
| getServerHostKeyAlgorithms () | |
| Return a list of the host key (public key) algorithms the server supports. More... | |
| getEncryptionAlgorithmsClient2Server () | |
| Return a list of the (symmetric key) encryption algorithms the server supports, when receiving stuff from the client. More... | |
| getEncryptionAlgorithmsServer2Client () | |
| Return a list of the (symmetric key) encryption algorithms the server supports, when sending stuff to the client. More... | |
| getMACAlgorithmsClient2Server () | |
| Return a list of the MAC algorithms the server supports, when receiving stuff from the client. More... | |
| getMACAlgorithmsServer2Client () | |
| Return a list of the MAC algorithms the server supports, when sending stuff to the client. More... | |
| getCompressionAlgorithmsClient2Server () | |
| Return a list of the compression algorithms the server supports, when receiving stuff from the client. More... | |
| getCompressionAlgorithmsServer2Client () | |
| Return a list of the compression algorithms the server supports, when sending stuff to the client. More... | |
| getLanguagesServer2Client () | |
| Return a list of the languages the server supports, when sending stuff to the client. More... | |
| getLanguagesClient2Server () | |
| Return a list of the languages the server supports, when receiving stuff from the client. More... | |
| getBannerMessage () | |
| Returns the banner message. More... | |
| getServerPublicHostKey () | |
| Returns the server public host key. More... | |
| getExitStatus () | |
| Returns the exit status of an SSH command or false. More... | |
| getWindowColumns () | |
| Returns the number of columns for the terminal window size. More... | |
| getWindowRows () | |
| Returns the number of rows for the terminal window size. More... | |
| setWindowColumns ($value) | |
| Sets the number of columns for the terminal window size. More... | |
| setWindowRows ($value) | |
| Sets the number of rows for the terminal window size. More... | |
| setWindowSize ($columns=80, $rows=24) | |
| Sets the number of columns and rows for the terminal window size. More... | |
| phpseclib\Net\SFTP::__construct | ( | $host, | |
$port = 22, |
|||
$timeout = 10 |
|||
| ) |
Default Constructor.
Connects to an SFTP server
| string | $host | |
| int | $port | |
| int | $timeout |
Reimplemented from phpseclib\Net\SSH2.
Definition at line 252 of file SFTP.php.
References phpseclib\Net\SSH2\$host, phpseclib\Net\SSH2\$port, phpseclib\Net\SSH2\$timeout, and phpseclib\Net\SSH2\_define_array().
Here is the call graph for this function:| phpseclib\Net\SFTP::_close_handle | ( | $handle | ) |
Close handle.
| string | $handle |
Definition at line 1979 of file SFTP.php.
References $response, phpseclib\Net\SFTP\_get_sftp_packet(), phpseclib\Net\SFTP\_logError(), phpseclib\Net\SFTP\_send_sftp_packet(), and phpseclib\Net\SSH2\_string_shift().
Referenced by phpseclib\Net\SFTP\_list(), phpseclib\Net\SFTP\chdir(), phpseclib\Net\SFTP\get(), phpseclib\Net\SFTP\put(), and phpseclib\Net\SFTP\touch().
Here is the call graph for this function:
Here is the caller graph for this function:| phpseclib\Net\SFTP::_comparator | ( | $a, | |
| $b | |||
| ) |
Compares two rawlist entries using parameters set by setListOrder()
Intended for use with uasort()
| array | $a | |
| array | $b |
Definition at line 928 of file SFTP.php.
References $result.
| phpseclib\Net\SFTP::_delete_recursive | ( | $path, | |
| & | $i | ||
| ) |
Recursively deletes directories on the SFTP server.
Minimizes directory lookups and SSH_FXP_STATUS requests for speed.
| string | $path | |
| int | $i |
Definition at line 2182 of file SFTP.php.
References $filename, $i, $path, phpseclib\Net\SFTP\_delete_recursive(), phpseclib\Net\SFTP\_list(), phpseclib\Net\SFTP\_read_put_responses(), phpseclib\Net\SFTP\_remove_from_stat_cache(), and phpseclib\Net\SFTP\_send_sftp_packet().
Referenced by phpseclib\Net\SFTP\_delete_recursive(), and phpseclib\Net\SFTP\delete().
Here is the call graph for this function:
Here is the caller graph for this function:| phpseclib\Net\SFTP::_disconnect | ( | $reason | ) |
Disconnect.
| int | $reason |
Reimplemented from phpseclib\Net\SSH2.
Definition at line 2839 of file SFTP.php.
| phpseclib\Net\SFTP::_get_lstat_cache_prop | ( | $path, | |
| $prop | |||
| ) |
Return an lstat properity.
Uses cache if appropriate.
| string | $path | |
| string | $prop |
Definition at line 2441 of file SFTP.php.
References $path, and phpseclib\Net\SFTP\_get_xstat_cache_prop().
Referenced by phpseclib\Net\SFTP\is_link().
Here is the call graph for this function:
Here is the caller graph for this function:| phpseclib\Net\SFTP::_get_sftp_packet | ( | ) |
Receives SFTP Packets.
See '6. General Packet Format' of draft-ietf-secsh-filexfer-13 for more info.
Incidentally, the number of SSH_MSG_CHANNEL_DATA messages has no bearing on the number of SFTP packets present. There can be one SSH_MSG_CHANNEL_DATA messages containing two SFTP packets or there can be two SSH_MSG_CHANNEL_DATA messages containing one SFTP packet.
Definition at line 2708 of file SFTP.php.
References $start.
Referenced by phpseclib\Net\SFTP\_close_handle(), phpseclib\Net\SFTP\_list(), phpseclib\Net\SFTP\_mkdir_helper(), phpseclib\Net\SFTP\_read_put_responses(), phpseclib\Net\SFTP\_realpath(), phpseclib\Net\SFTP\_setstat(), phpseclib\Net\SFTP\_stat(), phpseclib\Net\SFTP\chdir(), phpseclib\Net\SFTP\chmod(), phpseclib\Net\SFTP\delete(), phpseclib\Net\SFTP\get(), phpseclib\Net\SFTP\login(), phpseclib\Net\SFTP\put(), phpseclib\Net\SFTP\readlink(), phpseclib\Net\SFTP\rmdir(), phpseclib\Net\SFTP\symlink(), and phpseclib\Net\SFTP\touch().
Here is the caller graph for this function:| phpseclib\Net\SFTP::_get_stat_cache_prop | ( | $path, | |
| $prop | |||
| ) |
Return a stat properity.
Uses cache if appropriate.
| string | $path | |
| string | $prop |
Definition at line 2426 of file SFTP.php.
References $path, and phpseclib\Net\SFTP\_get_xstat_cache_prop().
Referenced by phpseclib\Net\SFTP\fileatime(), phpseclib\Net\SFTP\filegroup(), phpseclib\Net\SFTP\filemtime(), phpseclib\Net\SFTP\fileowner(), phpseclib\Net\SFTP\fileperms(), phpseclib\Net\SFTP\filesize(), phpseclib\Net\SFTP\filetype(), phpseclib\Net\SFTP\is_dir(), and phpseclib\Net\SFTP\is_file().
Here is the call graph for this function:
Here is the caller graph for this function:| phpseclib\Net\SFTP::_get_xstat_cache_prop | ( | $path, | |
| $prop, | |||
| $type | |||
| ) |
Return a stat or lstat properity.
Uses cache if appropriate.
| string | $path | |
| string | $prop |
Definition at line 2456 of file SFTP.php.
References $path, $result, $type, phpseclib\Net\SFTP\_query_stat_cache(), and phpseclib\Net\SFTP\_realpath().
Referenced by phpseclib\Net\SFTP\_get_lstat_cache_prop(), and phpseclib\Net\SFTP\_get_stat_cache_prop().
Here is the call graph for this function:
Here is the caller graph for this function:| phpseclib\Net\SFTP::_list | ( | $dir, | |
$raw = true |
|||
| ) |
Reads a list, be it detailed or not, of files in the given directory.
| string | $dir | |
| bool | $raw |
Definition at line 818 of file SFTP.php.
References $attributes, $i, $response, phpseclib\Net\SFTP\_close_handle(), phpseclib\Net\SFTP\_get_sftp_packet(), phpseclib\Net\SFTP\_logError(), phpseclib\Net\SFTP\_parseAttributes(), phpseclib\Net\SFTP\_parseLongname(), phpseclib\Net\SFTP\_realpath(), phpseclib\Net\SFTP\_send_sftp_packet(), phpseclib\Net\SSH2\_string_shift(), phpseclib\Net\SFTP\_update_stat_cache(), and phpseclib\Net\SSH2\MASK_LOGIN.
Referenced by phpseclib\Net\SFTP\_delete_recursive(), phpseclib\Net\SFTP\_nlist_helper(), phpseclib\Net\SFTP\_setstat_recursive(), and phpseclib\Net\SFTP\rawlist().
Here is the call graph for this function:
Here is the caller graph for this function:| phpseclib\Net\SFTP::_logError | ( | $response, | |
$status = -1 |
|||
| ) |
Logs errors.
| string | $response | |
| int | $status | @access public |
Definition at line 589 of file SFTP.php.
References $response, and phpseclib\Net\SSH2\_string_shift().
Referenced by phpseclib\Net\SFTP\_close_handle(), phpseclib\Net\SFTP\_list(), phpseclib\Net\SFTP\_mkdir_helper(), phpseclib\Net\SFTP\_read_put_responses(), phpseclib\Net\SFTP\_realpath(), phpseclib\Net\SFTP\_setstat(), phpseclib\Net\SFTP\_stat(), phpseclib\Net\SFTP\chdir(), phpseclib\Net\SFTP\chmod(), phpseclib\Net\SFTP\delete(), phpseclib\Net\SFTP\get(), phpseclib\Net\SFTP\put(), phpseclib\Net\SFTP\readlink(), phpseclib\Net\SFTP\rmdir(), phpseclib\Net\SFTP\symlink(), and phpseclib\Net\SFTP\touch().
Here is the call graph for this function:
Here is the caller graph for this function:| phpseclib\Net\SFTP::_mkdir_helper | ( | $dir, | |
| $attr | |||
| ) |
Helper function for directory creation.
| string | $dir |
Definition at line 1692 of file SFTP.php.
References $response, phpseclib\Net\SFTP\_get_sftp_packet(), phpseclib\Net\SFTP\_logError(), phpseclib\Net\SFTP\_send_sftp_packet(), and phpseclib\Net\SSH2\_string_shift().
Referenced by phpseclib\Net\SFTP\mkdir().
Here is the call graph for this function:
Here is the caller graph for this function:| phpseclib\Net\SFTP::_nlist_helper | ( | $dir, | |
| $recursive, | |||
| $relativeDir | |||
| ) |
Helper method for nlist.
| string | $dir | |
| bool | $recursive | |
| string | $relativeDir |
Definition at line 749 of file SFTP.php.
References $files, $result, phpseclib\Net\SFTP\_list(), phpseclib\Net\SFTP\_nlist_helper(), phpseclib\Net\SFTP\_query_stat_cache(), and phpseclib\Net\SFTP\_realpath().
Referenced by phpseclib\Net\SFTP\_nlist_helper(), and phpseclib\Net\SFTP\nlist().
Here is the call graph for this function:
Here is the caller graph for this function:| phpseclib\Net\SFTP::_parseAttributes | ( | & | $response | ) |
Parse Attributes.
See '7. File Attributes' of draft-ietf-secsh-filexfer-13 for more info.
| string | $response |
Definition at line 2534 of file SFTP.php.
References $i, $key, and $response.
Referenced by phpseclib\Net\SFTP\_list(), phpseclib\Net\SFTP\_stat(), and phpseclib\Net\SFTP\chmod().
Here is the caller graph for this function:| phpseclib\Net\SFTP::_parseLongname | ( | $longname | ) |
Parse Longname.
SFTPv3 doesn't provide any easy way of identifying a file type. You could try to open a file as a directory and see if an error is returned or you could try to parse the SFTPv3-specific longname field of the SSH_FXP_NAME packet. That's what this function does. The result is returned using the SFTPv4 type constants.
If the longname is in an unrecognized format bool(false) is returned.
| string | $longname |
Definition at line 2635 of file SFTP.php.
Referenced by phpseclib\Net\SFTP\_list().
Here is the caller graph for this function:| phpseclib\Net\SFTP::_parseMode | ( | $mode | ) |
Attempt to identify the file type.
Quoting the SFTP RFC, "Implementations MUST NOT send bits that are not defined" but they seem to anyway
| int | $mode |
Definition at line 2588 of file SFTP.php.
| phpseclib\Net\SFTP::_query_stat_cache | ( | $path | ) |
Checks cache for path.
Mainly used by file_exists
| string | $dir |
Definition at line 1118 of file SFTP.php.
References $path, and phpseclib\Net\SFTP\$stat_cache.
Referenced by phpseclib\Net\SFTP\_get_xstat_cache_prop(), phpseclib\Net\SFTP\_nlist_helper(), phpseclib\Net\SFTP\chdir(), phpseclib\Net\SFTP\file_exists(), phpseclib\Net\SFTP\lstat(), phpseclib\Net\SFTP\rawlist(), and phpseclib\Net\SFTP\stat().
Here is the caller graph for this function:| phpseclib\Net\SFTP::_read_put_responses | ( | $i | ) |
Reads multiple successive SSH_FXP_WRITE responses.
Sending an SSH_FXP_WRITE packet and immediately reading its response isn't as efficient as blindly sending out $i SSH_FXP_WRITEs, in succession, and then reading $i responses.
| int | $i |
Definition at line 1953 of file SFTP.php.
References $i, $response, phpseclib\Net\SFTP\_get_sftp_packet(), phpseclib\Net\SFTP\_logError(), and phpseclib\Net\SSH2\_string_shift().
Referenced by phpseclib\Net\SFTP\_delete_recursive(), phpseclib\Net\SFTP\_setstat(), phpseclib\Net\SFTP\_setstat_recursive(), phpseclib\Net\SFTP\delete(), and phpseclib\Net\SFTP\put().
Here is the call graph for this function:
Here is the caller graph for this function:| phpseclib\Net\SFTP::_realpath | ( | $path | ) |
Canonicalize the Server-Side Path Name.
SFTP doesn't provide a mechanism by which the current working directory can be changed, so we'll emulate it. Returns the absolute (canonicalized) path.
| string | $path |
Definition at line 616 of file SFTP.php.
References $path, $response, phpseclib\Net\SFTP\_get_sftp_packet(), phpseclib\Net\SFTP\_logError(), phpseclib\Net\SFTP\_send_sftp_packet(), phpseclib\Net\SSH2\_string_shift(), and phpseclib\Net\SFTP\pwd().
Referenced by phpseclib\Net\SFTP\_get_xstat_cache_prop(), phpseclib\Net\SFTP\_list(), phpseclib\Net\SFTP\_nlist_helper(), phpseclib\Net\SFTP\_setstat(), phpseclib\Net\SFTP\chdir(), phpseclib\Net\SFTP\delete(), phpseclib\Net\SFTP\file_exists(), phpseclib\Net\SFTP\get(), phpseclib\Net\SFTP\login(), phpseclib\Net\SFTP\lstat(), phpseclib\Net\SFTP\mkdir(), phpseclib\Net\SFTP\put(), phpseclib\Net\SFTP\rawlist(), phpseclib\Net\SFTP\readlink(), phpseclib\Net\SFTP\rmdir(), phpseclib\Net\SFTP\stat(), phpseclib\Net\SFTP\symlink(), and phpseclib\Net\SFTP\touch().
Here is the call graph for this function:
Here is the caller graph for this function:| phpseclib\Net\SFTP::_remove_from_stat_cache | ( | $path | ) |
Remove files / directories from cache.
| string | $path |
Definition at line 1091 of file SFTP.php.
References $i, $path, and phpseclib\Net\SFTP\$stat_cache.
Referenced by phpseclib\Net\SFTP\_delete_recursive(), phpseclib\Net\SFTP\_setstat(), phpseclib\Net\SFTP\delete(), phpseclib\Net\SFTP\lstat(), phpseclib\Net\SFTP\put(), phpseclib\Net\SFTP\rmdir(), and phpseclib\Net\SFTP\stat().
Here is the caller graph for this function:| phpseclib\Net\SFTP::_send_sftp_packet | ( | $type, | |
| $data | |||
| ) |
Sends SFTP Packets.
See '6. General Packet Format' of draft-ietf-secsh-filexfer-13 for more info.
| int | $type | |
| string | $data |
Definition at line 2667 of file SFTP.php.
References $data, $result, $start, and $type.
Referenced by phpseclib\Net\SFTP\_close_handle(), phpseclib\Net\SFTP\_delete_recursive(), phpseclib\Net\SFTP\_list(), phpseclib\Net\SFTP\_mkdir_helper(), phpseclib\Net\SFTP\_realpath(), phpseclib\Net\SFTP\_setstat(), phpseclib\Net\SFTP\_setstat_recursive(), phpseclib\Net\SFTP\_stat(), phpseclib\Net\SFTP\chdir(), phpseclib\Net\SFTP\chmod(), phpseclib\Net\SFTP\delete(), phpseclib\Net\SFTP\get(), phpseclib\Net\SFTP\login(), phpseclib\Net\SFTP\put(), phpseclib\Net\SFTP\readlink(), phpseclib\Net\SFTP\rmdir(), phpseclib\Net\SFTP\symlink(), and phpseclib\Net\SFTP\touch().
Here is the caller graph for this function:| phpseclib\Net\SFTP::_setstat | ( | $filename, | |
| $attr, | |||
| $recursive | |||
| ) |
Sets information about a file.
| string | $filename | |
| string | $attr | |
| bool | $recursive |
Definition at line 1450 of file SFTP.php.
References $filename, $i, $response, $result, phpseclib\Net\SFTP\_get_sftp_packet(), phpseclib\Net\SFTP\_logError(), phpseclib\Net\SFTP\_read_put_responses(), phpseclib\Net\SFTP\_realpath(), phpseclib\Net\SFTP\_remove_from_stat_cache(), phpseclib\Net\SFTP\_send_sftp_packet(), phpseclib\Net\SFTP\_setstat_recursive(), phpseclib\Net\SSH2\_string_shift(), and phpseclib\Net\SSH2\MASK_LOGIN.
Referenced by phpseclib\Net\SFTP\_setstat_recursive(), phpseclib\Net\SFTP\chgrp(), phpseclib\Net\SFTP\chmod(), phpseclib\Net\SFTP\chown(), phpseclib\Net\SFTP\touch(), and phpseclib\Net\SFTP\truncate().
Here is the call graph for this function:
Here is the caller graph for this function:| phpseclib\Net\SFTP::_setstat_recursive | ( | $path, | |
| $attr, | |||
| & | $i | ||
| ) |
Recursively sets information on directories on the SFTP server.
Minimizes directory lookups and SSH_FXP_STATUS requests for speed.
| string | $path | |
| string | $attr | |
| int | $i |
Definition at line 1509 of file SFTP.php.
References $filename, $i, $path, phpseclib\Net\SFTP\_list(), phpseclib\Net\SFTP\_read_put_responses(), phpseclib\Net\SFTP\_send_sftp_packet(), phpseclib\Net\SFTP\_setstat(), and phpseclib\Net\SFTP\_setstat_recursive().
Referenced by phpseclib\Net\SFTP\_setstat(), and phpseclib\Net\SFTP\_setstat_recursive().
Here is the call graph for this function:
Here is the caller graph for this function:| phpseclib\Net\SFTP::_stat | ( | $filename, | |
| $type | |||
| ) |
Returns general information about a file or symbolic link.
Determines information without calling \phpseclib\Net\SFTP::_realpath(). The second parameter can be either NET_SFTP_STAT or NET_SFTP_LSTAT.
| string | $filename | |
| int | $type |
Definition at line 1265 of file SFTP.php.
References $filename, $response, $type, phpseclib\Net\SFTP\_get_sftp_packet(), phpseclib\Net\SFTP\_logError(), phpseclib\Net\SFTP\_parseAttributes(), and phpseclib\Net\SFTP\_send_sftp_packet().
Referenced by phpseclib\Net\SFTP\lstat(), and phpseclib\Net\SFTP\stat().
Here is the call graph for this function:
Here is the caller graph for this function:| phpseclib\Net\SFTP::_update_stat_cache | ( | $path, | |
| $value | |||
| ) |
Save files / directories to cache.
| string | $path | |
| mixed | $value | @access private |
Definition at line 1047 of file SFTP.php.
References $i, $path, phpseclib\Net\SFTP\$stat_cache, phpseclib\Net\SFTP\lstat(), and phpseclib\Net\SFTP\stat().
Referenced by phpseclib\Net\SFTP\_list(), phpseclib\Net\SFTP\chdir(), phpseclib\Net\SFTP\login(), phpseclib\Net\SFTP\lstat(), and phpseclib\Net\SFTP\stat().
Here is the call graph for this function:
Here is the caller graph for this function:| phpseclib\Net\SFTP::chdir | ( | $dir | ) |
Changes the current directory.
| string | $dir |
Definition at line 672 of file SFTP.php.
References $response, phpseclib\Net\SFTP\_close_handle(), phpseclib\Net\SFTP\_get_sftp_packet(), phpseclib\Net\SFTP\_logError(), phpseclib\Net\SFTP\_query_stat_cache(), phpseclib\Net\SFTP\_realpath(), phpseclib\Net\SFTP\_send_sftp_packet(), phpseclib\Net\SFTP\_update_stat_cache(), phpseclib\Net\SSH2\MASK_LOGIN, and phpseclib\Net\SFTP\pwd().
Referenced by phpseclib\Net\SFTP\lstat(), and phpseclib\Net\SFTP\stat().
Here is the call graph for this function:
Here is the caller graph for this function:| phpseclib\Net\SFTP::chgrp | ( | $filename, | |
| $gid, | |||
$recursive = false |
|||
| ) |
Changes file or directory group.
Returns true on success or false on error.
| string | $filename | |
| int | $gid | |
| bool | $recursive |
Definition at line 1383 of file SFTP.php.
References $filename, and phpseclib\Net\SFTP\_setstat().
Here is the call graph for this function:| phpseclib\Net\SFTP::chmod | ( | $mode, | |
| $filename, | |||
$recursive = false |
|||
| ) |
Set permissions on a file.
Returns the new file permissions on success or false on error. If $recursive is true than this just returns true or false.
| int | $mode | |
| string | $filename | |
| bool | $recursive |
Definition at line 1402 of file SFTP.php.
References $filename, $response, phpseclib\Net\SFTP\_get_sftp_packet(), phpseclib\Net\SFTP\_logError(), phpseclib\Net\SFTP\_parseAttributes(), phpseclib\Net\SFTP\_send_sftp_packet(), and phpseclib\Net\SFTP\_setstat().
Here is the call graph for this function:| phpseclib\Net\SFTP::chown | ( | $filename, | |
| $uid, | |||
$recursive = false |
|||
| ) |
Changes file or directory owner.
Returns true on success or false on error.
| string | $filename | |
| int | $uid | |
| bool | $recursive |
Definition at line 1363 of file SFTP.php.
References $filename, and phpseclib\Net\SFTP\_setstat().
Here is the call graph for this function:| phpseclib\Net\SFTP::clearStatCache | ( | ) |
| phpseclib\Net\SFTP::delete | ( | $path, | |
$recursive = true |
|||
| ) |
Deletes a file on the SFTP server.
| string | $path | |
| bool | $recursive |
Definition at line 2132 of file SFTP.php.
References $i, $path, $response, $result, phpseclib\Net\SFTP\_delete_recursive(), phpseclib\Net\SFTP\_get_sftp_packet(), phpseclib\Net\SFTP\_logError(), phpseclib\Net\SFTP\_read_put_responses(), phpseclib\Net\SFTP\_realpath(), phpseclib\Net\SFTP\_remove_from_stat_cache(), phpseclib\Net\SFTP\_send_sftp_packet(), phpseclib\Net\SSH2\_string_shift(), and phpseclib\Net\SSH2\MASK_LOGIN.
Here is the call graph for this function:| phpseclib\Net\SFTP::disableStatCache | ( | ) |
| phpseclib\Net\SFTP::enableStatCache | ( | ) |
| phpseclib\Net\SFTP::file_exists | ( | $path | ) |
Checks whether a file or directory exists.
| string | $path |
Definition at line 2248 of file SFTP.php.
References $path, $result, phpseclib\Net\SFTP\_query_stat_cache(), phpseclib\Net\SFTP\_realpath(), and phpseclib\Net\SFTP\stat().
Here is the call graph for this function:| phpseclib\Net\SFTP::fileatime | ( | $path | ) |
Gets last access time of file.
| string | $path |
Definition at line 2319 of file SFTP.php.
References $path, and phpseclib\Net\SFTP\_get_stat_cache_prop().
Here is the call graph for this function:| phpseclib\Net\SFTP::filegroup | ( | $path | ) |
Gets file group.
| string | $path |
Definition at line 2367 of file SFTP.php.
References $path, and phpseclib\Net\SFTP\_get_stat_cache_prop().
Here is the call graph for this function:| phpseclib\Net\SFTP::filemtime | ( | $path | ) |
Gets file modification time.
| string | $path |
Definition at line 2331 of file SFTP.php.
References $path, and phpseclib\Net\SFTP\_get_stat_cache_prop().
Here is the call graph for this function:| phpseclib\Net\SFTP::fileowner | ( | $path | ) |
Gets file owner.
| string | $path |
Definition at line 2355 of file SFTP.php.
References $path, and phpseclib\Net\SFTP\_get_stat_cache_prop().
Here is the call graph for this function:| phpseclib\Net\SFTP::fileperms | ( | $path | ) |
Gets file permissions.
| string | $path |
Definition at line 2343 of file SFTP.php.
References $path, and phpseclib\Net\SFTP\_get_stat_cache_prop().
Here is the call graph for this function:| phpseclib\Net\SFTP::filesize | ( | $path | ) |
Gets file size.
| string | $path |
Definition at line 2379 of file SFTP.php.
References $path, and phpseclib\Net\SFTP\_get_stat_cache_prop().
Here is the call graph for this function:| phpseclib\Net\SFTP::filetype | ( | $path | ) |
Gets file type.
| string | $path |
Definition at line 2391 of file SFTP.php.
References $path, $type, and phpseclib\Net\SFTP\_get_stat_cache_prop().
Here is the call graph for this function:| phpseclib\Net\SFTP::get | ( | $remote_file, | |
$local_file = false, |
|||
$offset = 0, |
|||
$length = -1 |
|||
| ) |
Downloads a file from the SFTP server.
Returns a string containing the contents of $remote_file if $local_file is left undefined or a boolean false if the operation was unsuccessful. If $local_file is defined, returns true or false depending on the success of the operation.
$offset and $length can be used to download files in chunks.
| string | $remote_file | |
| string | $local_file | |
| int | $offset | |
| int | $length |
Definition at line 2018 of file SFTP.php.
References $response, $size, $start, phpseclib\Net\SFTP\_close_handle(), phpseclib\Net\SFTP\_get_sftp_packet(), phpseclib\Net\SFTP\_logError(), phpseclib\Net\SFTP\_realpath(), phpseclib\Net\SFTP\_send_sftp_packet(), and phpseclib\Net\SSH2\MASK_LOGIN.
Here is the call graph for this function:| phpseclib\Net\SFTP::getLastSFTPError | ( | ) |
| phpseclib\Net\SFTP::getSFTPErrors | ( | ) |
| phpseclib\Net\SFTP::getSFTPLog | ( | ) |
Returns a log of the packets that have been sent and received.
Returns a string if NET_SFTP_LOGGING == NET_SFTP_LOG_COMPLEX, an array if NET_SFTP_LOGGING == NET_SFTP_LOG_SIMPLE and false if !defined('NET_SFTP_LOGGING')
@access public
Definition at line 2779 of file SFTP.php.
| phpseclib\Net\SFTP::getSupportedVersions | ( | ) |
| phpseclib\Net\SFTP::is_dir | ( | $path | ) |
Tells whether the filename is a directory.
| string | $path |
Definition at line 2271 of file SFTP.php.
References $path, $result, and phpseclib\Net\SFTP\_get_stat_cache_prop().
Here is the call graph for this function:| phpseclib\Net\SFTP::is_file | ( | $path | ) |
Tells whether the filename is a regular file.
| string | $path |
Definition at line 2287 of file SFTP.php.
References $path, $result, and phpseclib\Net\SFTP\_get_stat_cache_prop().
Referenced by phpseclib\Net\SFTP\put().
Here is the call graph for this function:
Here is the caller graph for this function:| phpseclib\Net\SFTP::is_link | ( | $path | ) |
Tells whether the filename is a symbolic link.
| string | $path |
Definition at line 2303 of file SFTP.php.
References $path, $result, and phpseclib\Net\SFTP\_get_lstat_cache_prop().
Here is the call graph for this function:| phpseclib\Net\SFTP::login | ( | $username | ) |
Login.
| string | $username | |
| string | $password |
Reimplemented from phpseclib\Net\SSH2.
Definition at line 389 of file SFTP.php.
References $key, $response, phpseclib\Net\SFTP\$version, phpseclib\Net\SSH2\$window_size, phpseclib\Net\SSH2\_get_channel_packet(), phpseclib\Net\SFTP\_get_sftp_packet(), phpseclib\Net\SFTP\_realpath(), phpseclib\Net\SSH2\_send_binary_packet(), phpseclib\Net\SFTP\_send_sftp_packet(), phpseclib\Net\SSH2\_string_shift(), phpseclib\Net\SFTP\_update_stat_cache(), phpseclib\Net\SFTP\CHANNEL, and phpseclib\Net\SFTP\pwd().
Here is the call graph for this function:| phpseclib\Net\SFTP::lstat | ( | $filename | ) |
Returns general information about a file or symbolic link.
Returns an array on success and false otherwise.
| string | $filename |
Definition at line 1198 of file SFTP.php.
References $filename, phpseclib\Net\SFTP\$pwd, $result, phpseclib\Net\SFTP\_query_stat_cache(), phpseclib\Net\SFTP\_realpath(), phpseclib\Net\SFTP\_remove_from_stat_cache(), phpseclib\Net\SFTP\_stat(), phpseclib\Net\SFTP\_update_stat_cache(), phpseclib\Net\SFTP\chdir(), phpseclib\Net\SFTP\lstat(), phpseclib\Net\SSH2\MASK_LOGIN, and phpseclib\Net\SFTP\pwd().
Referenced by phpseclib\Net\SFTP\_update_stat_cache(), and phpseclib\Net\SFTP\lstat().
Here is the call graph for this function:
Here is the caller graph for this function:| phpseclib\Net\SFTP::mkdir | ( | $dir, | |
$mode = -1, |
|||
$recursive = false |
|||
| ) |
Creates a directory.
| string | $dir |
Definition at line 1657 of file SFTP.php.
References $i, $result, phpseclib\Net\SFTP\_mkdir_helper(), phpseclib\Net\SFTP\_realpath(), and phpseclib\Net\SSH2\MASK_LOGIN.
Here is the call graph for this function:| phpseclib\Net\SFTP::nlist | ( | $dir = '.', |
|
$recursive = false |
|||
| ) |
Returns a list of files in the given directory.
| string | $dir | |
| bool | $recursive |
Definition at line 735 of file SFTP.php.
References phpseclib\Net\SFTP\_nlist_helper().
Here is the call graph for this function:| phpseclib\Net\SFTP::put | ( | $remote_file, | |
| $data, | |||
$mode = self::SOURCE_STRING, |
|||
$start = -1, |
|||
$local_start = -1, |
|||
$progressCallback = null |
|||
| ) |
Uploads a file to the SFTP server.
By default, \phpseclib\Net\SFTP::put() does not read from the local filesystem. $data is dumped directly into $remote_file. So, for example, if you set $data to 'filename.ext' and then do \phpseclib\Net\SFTPget(), you will get a file, twelve bytes long, containing 'filename.ext' as its contents.
Setting $mode to self::SOURCE_LOCAL_FILE will change the above behavior. With self::SOURCE_LOCAL_FILE, $remote_file will contain as many bytes as filename.ext does on your local filesystem. If your filename.ext is 1MB then that is how large $remote_file will be, as well.
Setting $mode to self::SOURCE_CALLBACK will use $data as callback function, which gets only one parameter – number of bytes to return, and returns a string if there is some data or null if there is no more data
If $data is a resource then it'll be used as a resource instead.
Currently, only binary mode is supported. As such, if the line endings need to be adjusted, you will need to take care of that, yourself.
$mode can take an additional two parameters - self::RESUME and self::RESUME_START. These are bitwise AND'd with $mode. So if you want to resume upload of a 300mb file on the local file system you'd set $mode to the following:
self::SOURCE_LOCAL_FILE | self::RESUME
If you wanted to simply append the full contents of a local file to the full contents of a remote file you'd replace self::RESUME with self::RESUME_START.
If $mode & (self::RESUME | self::RESUME_START) then self::RESUME_START will be assumed.
$start and $local_start give you more fine grained control over this process and take precident over self::RESUME when they're non-negative. ie. $start could let you write at the end of a file (like self::RESUME) or in the middle of one. $local_start could let you start your reading from the end of a file (like self::RESUME_START) or in the middle of one.
Setting $local_start to > 0 or $mode | self::RESUME_START doesn't do anything unless $mode | self::SOURCE_LOCAL_FILE.
| string | $remote_file | |
| string | resource | $data | |
| int | $mode | |
| int | $start | |
| int | $local_start | |
| callable | null | $progressCallback |
Definition at line 1802 of file SFTP.php.
References $data, $i, $response, $size, $start, phpseclib\Net\SFTP\_close_handle(), phpseclib\Net\SFTP\_get_sftp_packet(), phpseclib\Net\SFTP\_logError(), phpseclib\Net\SFTP\_read_put_responses(), phpseclib\Net\SFTP\_realpath(), phpseclib\Net\SFTP\_remove_from_stat_cache(), phpseclib\Net\SFTP\_send_sftp_packet(), phpseclib\Net\SFTP\is_file(), phpseclib\Net\SSH2\MASK_LOGIN, phpseclib\Net\SFTP\size(), phpseclib\Net\SFTP\SOURCE_CALLBACK, and phpseclib\Net\SFTP\SOURCE_LOCAL_FILE.
Here is the call graph for this function:| phpseclib\Net\SFTP::pwd | ( | ) |
Returns the current directory name.
Definition at line 577 of file SFTP.php.
References phpseclib\Net\SFTP\$pwd.
Referenced by phpseclib\Net\SFTP\_realpath(), phpseclib\Net\SFTP\chdir(), phpseclib\Net\SFTP\login(), phpseclib\Net\SFTP\lstat(), and phpseclib\Net\SFTP\stat().
Here is the caller graph for this function:| phpseclib\Net\SFTP::rawlist | ( | $dir = '.', |
|
$recursive = false |
|||
| ) |
Returns a detailed list of files in the given directory.
| string | $dir | |
| bool | $recursive |
Definition at line 784 of file SFTP.php.
References $files, $key, phpseclib\Net\SFTP\_list(), phpseclib\Net\SFTP\_query_stat_cache(), phpseclib\Net\SFTP\_realpath(), and phpseclib\Net\SFTP\rawlist().
Referenced by phpseclib\Net\SFTP\rawlist().
Here is the call graph for this function:
Here is the caller graph for this function:| phpseclib\Net\SFTP::readlink | ( | $link | ) |
Return the target of a symbolic link.
| string | $link |
Definition at line 1577 of file SFTP.php.
References $response, phpseclib\Net\SFTP\_get_sftp_packet(), phpseclib\Net\SFTP\_logError(), phpseclib\Net\SFTP\_realpath(), phpseclib\Net\SFTP\_send_sftp_packet(), phpseclib\Net\SSH2\_string_shift(), and phpseclib\Net\SSH2\MASK_LOGIN.
Here is the call graph for this function:| phpseclib\Net\SFTP::rename | ( | $oldname, | |
| $newname | |||
| ) |
Renames a file or a directory on the SFTP server.
| string | $oldname | |
| string | $newname |
Definition at line 2485 of file SFTP.php.
References $response, and phpseclib\Net\SSH2\MASK_LOGIN.
| phpseclib\Net\SFTP::rmdir | ( | $dir | ) |
Removes a directory.
| string | $dir |
Definition at line 1720 of file SFTP.php.
References $response, phpseclib\Net\SFTP\_get_sftp_packet(), phpseclib\Net\SFTP\_logError(), phpseclib\Net\SFTP\_realpath(), phpseclib\Net\SFTP\_remove_from_stat_cache(), phpseclib\Net\SFTP\_send_sftp_packet(), phpseclib\Net\SSH2\_string_shift(), and phpseclib\Net\SSH2\MASK_LOGIN.
Here is the call graph for this function:| phpseclib\Net\SFTP::setListOrder | ( | ) |
Defines how nlist() and rawlist() will be sorted - if at all.
If sorting is enabled directories and files will be sorted independently with directories appearing before files in the resultant array that is returned.
Any parameter returned by stat is a valid sort parameter for this function. Filename comparisons are case insensitive.
Examples:
$sftp->setListOrder('filename', SORT_ASC); $sftp->setListOrder('size', SORT_DESC, 'filename', SORT_ASC); $sftp->setListOrder(true); Separates directories from files but doesn't do any sorting beyond that $sftp->setListOrder(); Don't do any sort of sorting
@access public
Definition at line 1002 of file SFTP.php.
References $i.
| phpseclib\Net\SFTP::size | ( | $filename | ) |
Returns the file size, in bytes, or false, on failure.
Files larger than 4GB will show up as being exactly 4GB.
| string | $filename |
Definition at line 1027 of file SFTP.php.
References $filename, $result, phpseclib\Net\SSH2\MASK_LOGIN, and phpseclib\Net\SFTP\stat().
Referenced by phpseclib\Net\SFTP\Stream\_stream_open(), phpseclib\Net\SFTP\Stream\_stream_read(), phpseclib\Net\SFTP\Stream\_stream_seek(), phpseclib\Net\SFTP\Stream\_stream_truncate(), phpseclib\Net\SFTP\Stream\_stream_write(), and phpseclib\Net\SFTP\put().
Here is the call graph for this function:
Here is the caller graph for this function:| phpseclib\Net\SFTP::stat | ( | $filename | ) |
Returns general information about a file.
Returns an array on success and false otherwise.
| string | $filename |
Definition at line 1141 of file SFTP.php.
References $filename, phpseclib\Net\SFTP\$pwd, $result, phpseclib\Net\SFTP\_query_stat_cache(), phpseclib\Net\SFTP\_realpath(), phpseclib\Net\SFTP\_remove_from_stat_cache(), phpseclib\Net\SFTP\_stat(), phpseclib\Net\SFTP\_update_stat_cache(), phpseclib\Net\SFTP\chdir(), phpseclib\Net\SSH2\MASK_LOGIN, phpseclib\Net\SFTP\pwd(), and phpseclib\Net\SFTP\stat().
Referenced by phpseclib\Net\SFTP\_update_stat_cache(), phpseclib\Net\SFTP\file_exists(), phpseclib\Net\SFTP\size(), and phpseclib\Net\SFTP\stat().
Here is the call graph for this function:
Here is the caller graph for this function:| phpseclib\Net\SFTP::symlink | ( | $target, | |
| $link | |||
| ) |
Create a symlink.
symlink() creates a symbolic link to the existing target with the specified name link.
| string | $target | |
| string | $link |
Definition at line 1621 of file SFTP.php.
References $response, $target, phpseclib\Net\SFTP\_get_sftp_packet(), phpseclib\Net\SFTP\_logError(), phpseclib\Net\SFTP\_realpath(), phpseclib\Net\SFTP\_send_sftp_packet(), phpseclib\Net\SSH2\_string_shift(), and phpseclib\Net\SSH2\MASK_LOGIN.
Here is the call graph for this function:| phpseclib\Net\SFTP::touch | ( | $filename, | |
$time = null, |
|||
$atime = null |
|||
| ) |
Sets access and modification time of file.
If the file does not exist, it will be created.
| string | $filename | |
| int | $time | |
| int | $atime |
Definition at line 1312 of file SFTP.php.
References $filename, $response, $time, phpseclib\Net\SFTP\_close_handle(), phpseclib\Net\SFTP\_get_sftp_packet(), phpseclib\Net\SFTP\_logError(), phpseclib\Net\SFTP\_realpath(), phpseclib\Net\SFTP\_send_sftp_packet(), phpseclib\Net\SFTP\_setstat(), and phpseclib\Net\SSH2\MASK_LOGIN.
Here is the call graph for this function:| phpseclib\Net\SFTP::truncate | ( | $filename, | |
| $new_size | |||
| ) |
Truncates a file to a given length.
| string | $filename | |
| int | $new_size |
Definition at line 1294 of file SFTP.php.
References $filename, and phpseclib\Net\SFTP\_setstat().
Here is the call graph for this function:| phpseclib\Net\SFTP::$pwd = false |
Definition at line 167 of file SFTP.php.
Referenced by phpseclib\Net\SFTP\lstat(), phpseclib\Net\SFTP\pwd(), and phpseclib\Net\SFTP\stat().
| phpseclib\Net\SFTP::$stat_cache = array() |
Definition at line 209 of file SFTP.php.
Referenced by phpseclib\Net\SFTP\_query_stat_cache(), phpseclib\Net\SFTP\_remove_from_stat_cache(), and phpseclib\Net\SFTP\_update_stat_cache().
| phpseclib\Net\SFTP::$version |
Definition at line 157 of file SFTP.php.
Referenced by phpseclib\Net\SFTP\login().
| const phpseclib\Net\SFTP::CHANNEL = 0x100 |
SFTP channel constant.
\phpseclib\Net\SSH2::exec() uses 0 and \phpseclib\Net\SSH2::read() / \phpseclib\Net\SSH2write() use 1.
Definition at line 60 of file SFTP.php.
Referenced by phpseclib\Net\SFTP\login().
| const phpseclib\Net\SFTP::RESUME_START = 8 |
| const phpseclib\Net\SFTP::SOURCE_CALLBACK = 16 |
Reads data from callback: function callback($length) returns string to proceed, null for EOF.
Definition at line 79 of file SFTP.php.
Referenced by phpseclib\Net\SFTP\put().
| const phpseclib\Net\SFTP::SOURCE_LOCAL_FILE = 1 |
#+ @access public
Definition at line 69 of file SFTP.php.
Referenced by phpseclib\Net\SFTP\put().
| const phpseclib\Net\SFTP::SOURCE_STRING = 2 |
Reads data from a string.
Definition at line 74 of file SFTP.php.
Referenced by phpseclib\Net\SFTP\Stream\_stream_write().