亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? ar.php

?? PHP 知識管理系統(基于樹結構的知識管理系統), 英文原版的PHP源碼。
?? PHP
字號:
<?php
/**
 * Read a file saved in Ar file format
 *
 * PHP versions 4 and 5
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330,Boston,MA 02111-1307 USA
 *
 * @category   File Formats
 * @package    File_Archive
 * @author     Pablo Fischer <pablo@pablo.com.mx>
 * @copyright  1997-2005 The PHP Group
 * @license    http://www.gnu.org/copyleft/lesser.html  LGPL
 * @version    CVS: $Id:
 * @link       http://pear.php.net/package/File_Archive
 */

require_once "File/Archive/Reader/Archive.php";

/**
 * Read an Ar archive
 */
class File_Archive_Reader_Ar extends File_Archive_Reader_Archive
{
    /**
     * @var    int       The number of files to read to reach the end of the
     *                   current ar file
     *
     * @access private
     */
    var $_nbBytesLeft = 0;

    /**
     * @var    int      The size of the header in number of bytes
     *                  The header is not always 60 bytes since it sometimes
     *                  contains a long filename
     * @access private
     */
    var $_header = 0;

    /**
     * @var    boolean   Flag set if their is a 1 byte footer after the data
     *                   of the current ar file
     *
     * @access private
     */
    var $_footer = false;

    /**
     * @var    boolean Flag that has tell us if we have read the header of the
     *                 current file
     * @access private
     */
    var $_alreadyRead = false;

    /**
     * @var    string  Name of the file being read
     * @access private
     */
    var $_currentFilename = null;

    /**
     * @var    string  Stat properties of the file being read
     *                 It has: name, utime, uid, gid, mode, size and data
     * @access private
     */
    var $_currentStat = null;

    /**
     * @see File_Archive_Reader::getFilename()
     */
    function getFilename()
    {
        return $this->_currentFilename;
    }

    /**
     * @see File_Archive_Reader::close()
     */
    function close()
    {
        $this->_currentFilename = null;
        $this->_currentStat = null;
        $this->_nbBytesLeft = 0;
        $this->_header = 0;
        $this->_footer = false;
        $this->_alreadyRead = false;
        return parent::close();
    }

    /**
     * @see File_Archive_Reader::getStat()
     */
    function getStat()
    {
        return $this->_currentStat;
    }

    /**
     * @see File_Archive_Reader::next()
     */
    function next()
    {
        $error = parent::next();
        if ($error !== true) {
            return $error;
        }

        $this->source->skip(
            $this->_nbBytesLeft + ($this->_footer ? 1 : 0)
        );

        $filename = $this->source->getDataFilename();

        if (!$this->_alreadyRead) {
            $header = $this->source->getData(8);
            if ($header != "!<arch>\n") {
                return PEAR::raiseError("File {$filename} is not a valid Ar file format (starts with $header)");
            }
            $this->_alreadyRead = true;
        }


        $name  = $this->source->getData(16);
        $mtime = $this->source->getData(12);
        $uid   = $this->source->getData(6);
        $gid   = $this->source->getData(6);
        $mode  = $this->source->getData(8);
        $size  = $this->source->getData(10);
        $delim = $this->source->getData(2);

        if ($delim === null) {
            return false;
        }

        // All files inside should have more than 0 bytes of size
        if ($size < 0) {
            return PEAR::raiseError("Files must be at least one byte long");
        }

        $this->_footer = ($size % 2 == 1);

        // if the filename starts with a length, then just read the bytes of it
        if (preg_match("/\#1\/(\d+)/", $name, $matches)) {
            $this->_header = 60 + $matches[1];
            $name = $this->source->getData($matches[1]);
            $size -= $matches[1];
        } else {
            // strip trailing spaces in name, so we can distinguish spaces in a filename with padding
            $this->_header = 60;
            $name = preg_replace ("/\s+$/", "", $name);
        }

        $this->_nbBytesLeft = $size;
        if (empty($name) || empty($mtime) || empty($uid) ||
            empty($gid)  || empty($mode)  || empty($size)) {
            return PEAR::raiseError("An ar field is empty");
        }

        $this->_currentFilename = $this->getStandardURL($name);
        $this->_currentStat = array(
                                    2       => $mode,
                                    'mode'  => $mode,
                                    4       => $uid,
                                    'uid'   => $uid,
                                    5       => $gid,
                                    'gid'   => $gid,
                                    7       => $size,
                                    'size'  => $size,
                                    9       => $mtime,
                                    'mtime' => $mtime
                                    );

        return true;
    }

    /**
     * @see File_Archive_Reader::getData()
     */
    function getData($length = -1)
    {
        if ($length == -1) {
            $length = $this->_nbBytesLeft;
        } else {
            $length = min($length, $this->_nbBytesLeft);
        }
        if ($length == 0) {
            return null;
        } else {
            $this->_nbBytesLeft -= $length;
            $data = $this->source->getData($length);
            if (PEAR::isError($data)) {
                return $data;
            }
            if (strlen($data) != $length) {
                return PEAR::raiseError('Unexpected end of Ar archive');
            }
            return $data;
        }
    }

    /**
     * @see File_Archive_Reader::skip
     */
    function skip($length = -1)
    {
        if ($length == -1) {
            $length = $this->_nbBytesLeft;
        } else {
            $length = min($length, $this->_nbBytesLeft);
        }
        if ($length == 0) {
            return 0;
        } else {
            $this->_nbBytesLeft -= $length;
            $skipped = $this->source->skip($length);
            if (PEAR::isError($skipped)) {
                return $skipped;
            }
            if ($skipped != $length) {
                return PEAR::raiseError('Unexpected end of Ar archive');
            }
            return $skipped;
        }
    }

    /**
     * @see File_Archive_Reader::rewind
     */
    function rewind($length = -1)
    {
        if ($length == -1) {
            $length = $this->_currentStat[7] - $this->_nbBytesLeft;
        } else {
            $length = min($length, $this->_currentStat[7] - $this->_nbBytesLeft);
        }
        if ($length == 0) {
            return 0;
        } else {
            $rewinded = $this->source->rewind($length);
            if (!PEAR::isError($rewinded)) {
                $this->_nbBytesLeft += $rewinded;
            }
            return $rewinded;
        }
    }

    /**
     * @see File_Archive_Reader::tell()
     */
    function tell()
    {
        return $this->_currentStat[7] - $this->_nbBytesLeft;
    }

    /**
     * @see File_Archive_Reader::makeWriterRemoveFiles()
     */
    function makeWriterRemoveFiles($pred)
    {
        require_once "File/Archive/Writer/Ar.php";

        $blocks = array();
        $seek = null;
        $gap = 0;
        if ($this->_currentFilename !== null && $pred->isTrue($this)) {
            $seek = $this->_header + $this->_currentStat[7] + ($this->_footer ? 1 : 0);
            $blocks[] = $seek; //Remove this file
        }

        while (($error = $this->next()) === true) {
            $size = $this->_header + $this->_currentStat[7] + ($this->_footer ? 1 : 0);
            if ($pred->isTrue($this)) {
                if ($seek === null) {
                    $seek = $size;
                    $blocks[] = $size;
                } else if ($gap > 0) {
                    $blocks[] = $gap; //Don't remove the files between the gap
                    $blocks[] = $size;
                    $seek += $size;
                } else {
                    $blocks[count($blocks)-1] += $size;   //Also remove this file
                    $seek += $size;
                }
                $gap = 0;
            } else {
                if ($seek !== null) {
                    $seek += $size;
                    $gap += $size;
                }
            }
        }
        if ($seek === null) {
            $seek = 0;
        } else {
            if ($gap == 0) {
                array_pop($blocks);
            } else {
                $blocks[] = $gap;
            }
        }

        $writer = new File_Archive_Writer_Ar(null,
            $this->source->makeWriterRemoveBlocks($blocks, -$seek)
        );
        $this->close();
        return $writer;
    }

    /**
     * @see File_Archive_Reader::makeWriterRemoveBlocks()
     */
    function makeWriterRemoveBlocks($blocks, $seek = 0)
    {
        if ($this->_currentStat === null) {
            return PEAR::raiseError('No file selected');
        }

        $blockPos = $this->_currentStat[7] - $this->_nbBytesLeft + $seek;

        $this->rewind();
        $keep = false;

        $data = $this->getData($blockPos);
        foreach ($blocks as $length) {
            if ($keep) {
                $data .= $this->getData($length);
            } else {
                $this->skip($length);
            }
            $keep = !$keep;
        }
        if ($keep) {
            $data .= $this->getData();
        }

        $filename = $this->_currentFilename;
        $stat = $this->_currentStat;

        $writer = $this->makeWriterRemove();
        if (PEAR::isError($writer)) {
            return $writer;
        }

        unset($stat[7]);
        $writer->newFile($filename, $stat);
        $writer->writeData($data);
        return $writer;
    }

    /**
     * @see File_Archive_Reader::makeAppendWriter
     */
    function makeAppendWriter()
    {
        require_once "File/Archive/Writer/Ar.php";

        while (($error = $this->next()) === true) { }
        if (PEAR::isError($error)) {
            $this->close();
            return $error;
        }

        $innerWriter = $this->source->makeWriterRemoveBlocks(array());
        if (PEAR::isError($innerWriter)) {
            return $innerWriter;
        }

        unset($this->source);
        $this->close();

        return new File_Archive_Writer_Ar(null, $innerWriter);
    }
}
?>

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美日韩大陆一区二区| 在线观看日韩毛片| 日本亚洲欧美天堂免费| 尤物视频一区二区| 日韩理论电影院| 亚洲欧美日韩国产手机在线| 中文字幕中文乱码欧美一区二区| 久久久久99精品一区| 久久蜜桃av一区二区天堂| 久久你懂得1024| 亚洲国产精品精华液2区45| 国产午夜亚洲精品羞羞网站| 国产欧美一区二区在线观看| 欧美国产精品久久| 综合久久综合久久| 一级女性全黄久久生活片免费| 亚洲精品国产成人久久av盗摄| 一区二区三区加勒比av| 午夜视频在线观看一区二区| 水蜜桃久久夜色精品一区的特点| 视频精品一区二区| 美洲天堂一区二卡三卡四卡视频| 久久av中文字幕片| 国产成人av电影在线| 波多野结衣亚洲| 色94色欧美sute亚洲线路二| 欧美精品在线观看播放| 精品国产三级电影在线观看| 国产精品无码永久免费888| 亚洲人亚洲人成电影网站色| 亚洲一区免费视频| 日韩高清不卡一区二区| 国产九九视频一区二区三区| 91同城在线观看| 欧美猛男gaygay网站| 2021国产精品久久精品| 国产精品久久久久久久久免费樱桃 | 国产在线国偷精品免费看| 盗摄精品av一区二区三区| 欧美影院午夜播放| 日韩免费观看2025年上映的电影| 中文在线一区二区| 亚洲国产精品久久久男人的天堂| 久久福利视频一区二区| 波多野结衣在线aⅴ中文字幕不卡| 欧美在线看片a免费观看| 精品奇米国产一区二区三区| 中文字幕在线不卡一区| 日韩二区在线观看| 成年人国产精品| 欧美福利一区二区| 国产精品久久久久婷婷| 日韩中文字幕不卡| 成人精品免费视频| 日韩无一区二区| 亚洲青青青在线视频| 极品少妇一区二区| 91精品91久久久中77777| 精品国产乱码久久久久久久久| 亚洲三级免费观看| 国产一区欧美日韩| 欧美视频精品在线观看| 国产人成亚洲第一网站在线播放 | 国产在线播放一区二区三区| 91网站最新地址| 久久亚区不卡日本| 午夜久久久久久久久久一区二区| 成人在线视频首页| 精品久久久网站| 亚洲电影视频在线| 97久久超碰精品国产| 欧美va在线播放| 日日夜夜免费精品| 一本色道**综合亚洲精品蜜桃冫| 2020国产精品| 三级亚洲高清视频| 欧美色网一区二区| 亚洲色图清纯唯美| 丁香婷婷深情五月亚洲| 日韩一二三区视频| 丝袜亚洲另类丝袜在线| 91成人在线精品| 亚洲欧美在线观看| 高清成人在线观看| 久久亚洲二区三区| 久久99精品久久久久久动态图 | 亚洲欧美一区二区久久| 国产成人精品免费视频网站| xnxx国产精品| 免费不卡在线观看| 制服丝袜亚洲精品中文字幕| 一区二区在线电影| 色综合久久88色综合天天| 国产精品护士白丝一区av| 成人黄色在线网站| 国产精品久久久久影院亚瑟| 国产91精品免费| 国产欧美精品一区二区色综合 | 欧美天堂亚洲电影院在线播放| 亚洲同性gay激情无套| 成人毛片在线观看| 国产欧美日韩卡一| 不卡一区在线观看| 国产精品免费久久久久| 不卡的av在线播放| 国产精品第13页| 99re视频这里只有精品| 亚洲欧洲成人自拍| 色综合久久久久网| 亚洲欧美日韩国产一区二区三区| 色综合咪咪久久| 亚洲女同一区二区| 日本精品一区二区三区四区的功能| 亚洲人xxxx| 欧美女孩性生活视频| 日本vs亚洲vs韩国一区三区二区 | 在线观看国产一区二区| 亚洲久草在线视频| 91国内精品野花午夜精品| 亚洲精品久久嫩草网站秘色| 在线影视一区二区三区| 五月天欧美精品| 欧美一级片在线看| 激情都市一区二区| 国产日韩欧美不卡| 99精品视频中文字幕| 亚洲综合色噜噜狠狠| 欧美嫩在线观看| 国内精品国产成人国产三级粉色| 国产喂奶挤奶一区二区三区| 99久久er热在这里只有精品66| 亚洲精品精品亚洲| 日韩小视频在线观看专区| 国产毛片精品视频| 中文字幕在线观看一区二区| 在线精品视频小说1| 石原莉奈在线亚洲二区| 国产日韩欧美a| 欧美亚洲国产一卡| 久久超碰97人人做人人爱| 中文字幕乱码亚洲精品一区| 91黄色免费版| 久久精品二区亚洲w码| 国产精品另类一区| 欧美日韩视频专区在线播放| 狠狠狠色丁香婷婷综合激情| 尤物视频一区二区| 精品99一区二区三区| 色综合色狠狠天天综合色| 免费一级片91| 中文字幕一区二区三区在线观看 | 欧美丝袜丝交足nylons| 激情综合网av| 亚洲精品免费在线| 日韩女优制服丝袜电影| 91网上在线视频| 久久99久久精品| 亚洲精品水蜜桃| 久久久久久久免费视频了| 一本久道久久综合中文字幕| 国产一区二区在线观看免费| 一区二区三区在线视频播放 | 亚洲第一二三四区| 国产蜜臀av在线一区二区三区| 欧美日韩一区二区在线视频| 国产福利一区二区三区视频在线 | 国产精品一区二区在线观看不卡| 亚洲男人都懂的| 久久久久久99久久久精品网站| 色狠狠av一区二区三区| 国产一区二区三区免费观看| 亚洲电影一级片| **欧美大码日韩| 久久先锋资源网| 欧美高清性hdvideosex| 91婷婷韩国欧美一区二区| 国产九色sp调教91| 麻豆精品在线视频| 亚洲一区二区三区激情| 天涯成人国产亚洲精品一区av| 中文字幕中文乱码欧美一区二区| 欧美精品一区男女天堂| 欧美男同性恋视频网站| 欧洲一区二区三区免费视频| 粉嫩13p一区二区三区| 久久成人免费电影| 无码av免费一区二区三区试看| 成人欧美一区二区三区在线播放| 亚洲精品在线免费播放| 777色狠狠一区二区三区| 欧美性猛交xxxx黑人交| 91福利在线免费观看| 亚洲午夜免费视频| 紧缚奴在线一区二区三区| 久久久夜色精品亚洲| 欧美变态tickle挠乳网站| 欧美高清你懂得| 欧美日韩成人综合| 在线成人av影院| 欧美日本高清视频在线观看|