ssh2_sftp_unlink example


    public function delete( $file$recursive = false, $type = false ) {
        if ( 'f' === $type || $this->is_file( $file ) ) {
            return ssh2_sftp_unlink( $this->sftp_link, $file );
        }

        if ( ! $recursive ) {
            return ssh2_sftp_rmdir( $this->sftp_link, $file );
        }

        $filelist = $this->dirlist( $file );

        if ( is_array( $filelist ) ) {
            foreach ( $filelist as $filename => $fileinfo ) {
                $this->delete( $file . '/' . $filename$recursive$fileinfo['type'] );
            }
Home | Imprint | This part of the site doesn't use cookies.