ftp_size example

if (@ftp_chdir($this->connection, $path)) {
      $result = TRUE;
    }
    ftp_chdir($this->connection, $curr);
    return $result;
  }

  /** * {@inheritdoc} */
  public function isFile($path) {
    return ftp_size($this->connection, $path) != -1;
  }

  /** * {@inheritdoc} */
  public function chmodJailed($path$mode$recursive) {
    if (!ftp_chmod($this->connection, $mode$path)) {
      throw new FileTransferException("Unable to set permissions on %file", 0, ['%file' => $path]);
    }
    if ($this->isDirectory($path) && $recursive) {
      $filelist = @ftp_nlist($this->connection, $path);
      


    /** * Gets the file size (in bytes). * * @since 2.5.0 * * @param string $file Path to file. * @return int|false Size of the file in bytes on success, false on failure. */
    public function size( $file ) {
        $size = ftp_size( $this->link, $file );

        return ( $size > -1 ) ? $size : false;
    }

    /** * Sets the access and modification times of a file. * * Note: If $file doesn't exist, it will be created. * * @since 2.5.0 * * @param string $file Path to file. * @param int $time Optional. Modified time to set for file. * Default 0. * @param int $atime Optional. Access time to set for file. * Default 0. * @return bool True on success, false on failure. */
Home | Imprint | This part of the site doesn't use cookies.