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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? qfileinfo.cpp

?? QT 開發(fā)環(huán)境里面一個很重要的文件
?? CPP
?? 第 1 頁 / 共 3 頁
字號:
/******************************************************************************** Copyright (C) 1992-2006 Trolltech ASA. All rights reserved.**** This file is part of the QtCore module of the Qt Toolkit.**** This file may be used under the terms of the GNU General Public** License version 2.0 as published by the Free Software Foundation** and appearing in the file LICENSE.GPL included in the packaging of** this file.  Please review the following information to ensure GNU** General Public Licensing requirements will be met:** http://www.trolltech.com/products/qt/opensource.html**** If you are unsure which license is appropriate for your use, please** review the following information:** http://www.trolltech.com/products/qt/licensing.html or contact the** sales department at sales@trolltech.com.**** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.******************************************************************************/#include "qplatformdefs.h"#include "qfileinfo.h"#include "qdatetime.h"#include "qabstractfileengine.h"#include "qfsfileengine_p.h"#include "qglobal.h"#include "qatomic.h"#include "qhash.h"#include "qdir.h"class QFileInfoPrivate{public:    QFileInfoPrivate(const QFileInfo *copy=0);    ~QFileInfoPrivate();    void initFileEngine(const QString &);    enum Access {        ReadAccess,        WriteAccess,        ExecuteAccess    };    bool hasAccess(Access access) const;    uint getFileFlags(QAbstractFileEngine::FileFlags) const;    QDateTime &getFileTime(QAbstractFileEngine::FileTime) const;    QString getFileName(QAbstractFileEngine::FileName) const;    enum { CachedFileFlags=0x01, CachedLinkTypeFlag=0x02,           CachedMTime=0x10, CachedCTime=0x20, CachedATime=0x40,           CachedSize =0x08 };    struct Data {        inline Data()            : ref(1), fileEngine(0), cache_enabled(1)        { clear(); }        inline Data(const Data &copy)            : ref(1), fileEngine(QAbstractFileEngine::create(copy.fileName)),              fileName(copy.fileName), cache_enabled(copy.cache_enabled)        { clear(); }        inline ~Data() { delete fileEngine; }        inline void clear() {            fileNames.clear();            fileFlags = 0;            cachedFlags = 0;        }        mutable QAtomic ref;        QAbstractFileEngine *fileEngine;        mutable QString fileName;        mutable QHash<int, QString> fileNames;        mutable uint cachedFlags : 31;        mutable uint cache_enabled : 1;        mutable uint fileFlags;        mutable qint64 fileSize;        mutable QDateTime fileTimes[3];        inline bool getCachedFlag(uint c) const        { return cache_enabled ? (cachedFlags & c) : 0; }        inline void setCachedFlag(uint c)        { if (cache_enabled) cachedFlags |= c; }    } *data;    inline void reset() {        detach();        data->clear();    }    void detach();};QFileInfoPrivate::QFileInfoPrivate(const QFileInfo *copy){    if(copy) {        copy->d_func()->data->ref.ref();        data = copy->d_func()->data;    } else {        data = new QFileInfoPrivate::Data;        data->clear();    }}QFileInfoPrivate::~QFileInfoPrivate(){    if (!data->ref.deref())        delete data;    data = 0;}voidQFileInfoPrivate::initFileEngine(const QString &file){    detach();    delete data->fileEngine;    data->fileEngine = 0;    data->clear();    data->fileEngine = QAbstractFileEngine::create(file);    data->fileName = file;}bool QFileInfoPrivate::hasAccess(Access access) const{    if (!(data->fileEngine->fileFlags() & QAbstractFileEngine::LocalDiskFlag)) {        switch (access) {        case ReadAccess:            return getFileFlags(QAbstractFileEngine::ReadUserPerm);        case WriteAccess:            return getFileFlags(QAbstractFileEngine::WriteUserPerm);        case ExecuteAccess:            return getFileFlags(QAbstractFileEngine::ExeUserPerm);        default:            return false;        }    }    int mode = 0;    switch (access) {    case ReadAccess:        mode = R_OK;        break;    case WriteAccess:        mode = W_OK;        break;    case ExecuteAccess:        mode = X_OK;        break;    };#ifdef Q_OS_UNIX    return QT_ACCESS(QFile::encodeName(data->fileName).data(), mode) == 0;#endif#ifdef Q_OS_WIN    if ((access == ReadAccess && !getFileFlags(QAbstractFileEngine::ReadUserPerm))        || (access == WriteAccess && !getFileFlags(QAbstractFileEngine::WriteUserPerm))) {        return false;    }    if (access == ExecuteAccess)        return getFileFlags(QAbstractFileEngine::ExeUserPerm);    QT_WA( {        return ::_waccess((TCHAR *)QFSFileEnginePrivate::longFileName(data->fileName).utf16(), mode) == 0;    } , {        return QT_ACCESS(QFSFileEnginePrivate::win95Name(data->fileName), mode) == 0;    } );#endif    return false;}void QFileInfoPrivate::detach(){ qAtomicDetach(data); }QStringQFileInfoPrivate::getFileName(QAbstractFileEngine::FileName name) const{    if(data->cache_enabled && data->fileNames.contains((int)name))        return data->fileNames.value(name);    QString ret = data->fileEngine->fileName(name);    if(data->cache_enabled)        data->fileNames.insert((int)name, ret);    return ret;}uintQFileInfoPrivate::getFileFlags(QAbstractFileEngine::FileFlags request) const{    // we split the testing for LinkType and the rest because, in order to    // determine if a file is a symlink or not, we have to lstat(). If we're not    // interested in that information, we might as well avoid one extra syscall.    QAbstractFileEngine::FileFlags flags;    if (!data->getCachedFlag(CachedFileFlags)) {        QAbstractFileEngine::FileFlags req = QAbstractFileEngine::FileInfoAll;        req &= (~QAbstractFileEngine::LinkType);        flags = data->fileEngine->fileFlags(req);        data->setCachedFlag(CachedFileFlags);        data->fileFlags |= uint(flags);    } else {        flags = QAbstractFileEngine::FileFlags(data->fileFlags & request);    }    if (request & QAbstractFileEngine::LinkType) {        if (!data->getCachedFlag(CachedLinkTypeFlag)) {            QAbstractFileEngine::FileFlags linkflag;            linkflag = data->fileEngine->fileFlags(QAbstractFileEngine::LinkType);            data->setCachedFlag(CachedLinkTypeFlag);            data->fileFlags |= uint(linkflag);            flags |= linkflag;        }    }    // no else branch    // if we had it cached, it was caught in the previous else branch    return flags & request;}QDateTime&QFileInfoPrivate::getFileTime(QAbstractFileEngine::FileTime request) const{    if(request == QAbstractFileEngine::CreationTime) {        if(data->getCachedFlag(CachedCTime))            return data->fileTimes[request];        data->setCachedFlag(CachedCTime);        return (data->fileTimes[request] = data->fileEngine->fileTime(request));    }    if(request == QAbstractFileEngine::ModificationTime) {        if(data->getCachedFlag(CachedMTime))            return data->fileTimes[request];        data->setCachedFlag(CachedMTime);        return (data->fileTimes[request] = data->fileEngine->fileTime(request));    }    if(request == QAbstractFileEngine::AccessTime) {        if(data->getCachedFlag(CachedATime))            return data->fileTimes[request];        data->setCachedFlag(CachedATime);        return (data->fileTimes[request] = data->fileEngine->fileTime(request));    }    return data->fileTimes[0]; //cannot really happen}//************* QFileInfo/*!    \class QFileInfo    \reentrant    \brief The QFileInfo class provides system-independent file information.    \ingroup io    \ingroup shared    QFileInfo provides information about a file's name and position    (path) in the file system, its access rights and whether it is a    directory or symbolic link, etc. The file's size and last    modified/read times are also available. QFileInfo can also be    used to obtain information about a Qt \l{resource    system}{resource}.    A QFileInfo can point to a file with either a relative or an    absolute file path. Absolute file paths begin with the directory    separator "/" (or with a drive specification on Windows). Relative    file names begin with a directory name or a file name and specify    a path relative to the current working directory. An example of an    absolute path is the string "/tmp/quartz". A relative path might    look like "src/fatlib". You can use the function isRelative() to    check whether a QFileInfo is using a relative or an absolute file    path. You can call the function makeAbsolute() to convert a    relative QFileInfo's path to an absolute path.    The file that the QFileInfo works on is set in the constructor or    later with setFile(). Use exists() to see if the file exists and    size() to get its size.    Some of QFileInfo's functions query the file system, but for    performance reasons, some functions only operate on the    file name itself. For example: To return the absolute path of    a relative file name, absolutePath() has to query the file system.    The path() function, however, can work on the file name directly,    and so it is faster. By convention, QFileInfo interprets any path that    ends with a slash '/' as a directory (e.g., "C:/WINDOWS/"), and    those without a trailing slash (e.g., "C:/WINDOWS/hosts.txt")    are treated as files.        To speed up performance, QFileInfo caches information about the    file. Because files can be changed by other users or programs, or    even by other parts of the same program, there is a function that    refreshes the file information: refresh(). If you want to switch    off a QFileInfo's caching and force it to access the file system    every time you request information from it call setCaching(false).    The file's type is obtained with isFile(), isDir() and    isSymLink(). The symLinkTarget() function provides the name of the file    the symlink points to.    On Unix (including Mac OS X), the symlink has the same size() has    the file it points to, because Unix handles symlinks    transparently; similarly, opening a symlink using QFile    effectively opens the link's target. For example:    \code        #ifdef Q_OS_UNIX        QFileInfo info1("/home/bob/bin/untabify");        info1.isSymLink();          // returns true        info1.absoluteFilePath();   // returns "/home/bob/bin/untabify"        info1.size();               // returns 56201        info1.symLinkTarget();      // returns "/opt/pretty++/bin/untabify"        QFileInfo info2(info1.symLinkTarget());        info1.isSymLink();          // returns false        info1.absoluteFilePath();   // returns "/opt/pretty++/bin/untabify"        info1.size();               // returns 56201        #endif    \endcode    On Windows, symlinks (shortcuts) are \c .lnk files. The reported    size() is that of the symlink (not the link's target), and    opening a symlink using QFile opens the \c .lnk file. For    example:    \code        #ifdef Q_OS_WIN        QFileInfo info1("C:\\Documents and Settings\\Bob\\untabify.lnk");        info1.isSymLink();          // returns true        info1.absoluteFilePath();   // returns "C:/Documents and Settings/Bob/untabify.lnk"        info1.size();               // returns 743        info1.symLinkTarget();      // returns "C:/Pretty++/untabify"        QFileInfo info2(info1.symLinkTarget());        info1.isSymLink();          // returns false        info1.absoluteFilePath();   // returns "C:/Pretty++/untabify"        info1.size();               // returns 63942        #endif    \endcode    Elements of the file's name can be extracted with path() and    fileName(). The fileName()'s parts can be extracted with    baseName() and extension().    The file's dates are returned by created(), lastModified() and    lastRead(). Information about the file's access permissions is    obtained with isReadable(), isWritable() and isExecutable(). The    file's ownership is available from owner(), ownerId(), group() and    groupId(). You can examine a file's permissions and ownership in a    single statement using the permission() function.    \sa QDir, QFile*//*!    Constructs an empty QFileInfo object.    Note that an empty QFileInfo object contain no file reference.    \sa setFile()*/QFileInfo::QFileInfo() : d_ptr(new QFileInfoPrivate()){}/*!    Constructs a new QFileInfo that gives information about the given    file. The \a file can also include an absolute or relative path.    \sa setFile(), isRelative(), QDir::setCurrent(), QDir::isRelativePath()*/QFileInfo::QFileInfo(const QString &file) : d_ptr(new QFileInfoPrivate()){    d_ptr->initFileEngine(file);}/*!    Constructs a new QFileInfo that gives information about file \a    file.    If the \a file has a relative path, the QFileInfo will also have a    relative path.    \sa isRelative()*/QFileInfo::QFileInfo(const QFile &file) : d_ptr(new QFileInfoPrivate()){    d_ptr->initFileEngine(file.fileName());}/*!    Constructs a new QFileInfo that gives information about the given    \a file in the directory \a dir.    If \a dir has a relative path, the QFileInfo will also have a    relative path.    \sa isRelative()*/QFileInfo::QFileInfo(const QDir &dir, const QString &file) : d_ptr(new QFileInfoPrivate()){    d_ptr->initFileEngine(dir.filePath(file));}/*!    Constructs a new QFileInfo that is a copy of the given \a fileinfo.*/QFileInfo::QFileInfo(const QFileInfo &fileinfo) : d_ptr(new QFileInfoPrivate(&fileinfo)){}/*!    Destroys the QFileInfo and frees its resources.*/QFileInfo::~QFileInfo(){    delete d_ptr;    d_ptr = 0;}/*!    \fn bool QFileInfo::operator!=(const QFileInfo &fileinfo)    Returns true if this QFileInfo object refers to a different file    than the one specified by \a fileinfo; otherwise returns false.    \sa operator==()*//*!    \overload    \fn bool QFileInfo::operator!=(const QFileInfo &fileinfo) const*//*!    \overload*/boolQFileInfo::operator==(const QFileInfo &fileinfo) const{    Q_D(const QFileInfo);    // ### Qt 5: understand long and short file names on Windows    // ### (GetFullPathName()).    if(fileinfo.d_func()->data == d->data)        return true;    if(!d->data->fileEngine || !fileinfo.d_func()->data->fileEngine)        return false;    if(d->data->fileEngine->caseSensitive() != fileinfo.d_func()->data->fileEngine->caseSensitive())        return false;    if(fileinfo.size() == size()) { //if the size isn't the same...        QString file1 = absoluteFilePath(),                file2 = fileinfo.absoluteFilePath();        if(file1.length() == file2.length()) {            if(!fileinfo.d_func()->data->fileEngine->caseSensitive()) {                for(int i = 0; i < file1.length(); i++) {                    if(file1.at(i).toLower() != file2.at(i).toLower())                        return false;                }                return true;            }            return (file1 == file2);        }

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
尤物视频一区二区| 精品va天堂亚洲国产| 国产精品久久久久影院| 国内成+人亚洲+欧美+综合在线 | 91精品国产色综合久久ai换脸| 亚洲第一精品在线| 678五月天丁香亚洲综合网| 无吗不卡中文字幕| 日韩免费视频一区二区| 国产在线精品视频| 国产精品丝袜黑色高跟| 在线免费视频一区二区| 亚洲成人av电影| 日韩午夜av电影| 国产酒店精品激情| 亚洲理论在线观看| 91精品国产91热久久久做人人| 久久99国内精品| 亚洲国产精品99久久久久久久久| 91日韩一区二区三区| 五月天视频一区| 久久品道一品道久久精品| 成人毛片老司机大片| 亚洲综合色丁香婷婷六月图片| 91麻豆精品国产91久久久使用方法 | 麻豆精品久久精品色综合| 久久精品日韩一区二区三区| www.亚洲精品| 日韩av电影天堂| 国产精品色哟哟| 欧美人妇做爰xxxⅹ性高电影| 国产一区二区三区高清播放| 亚洲欧美aⅴ...| 日韩欧美精品在线| 99国产精品99久久久久久| 免费成人美女在线观看.| 国产精品福利一区二区| 欧美一区二视频| 成人短视频下载| 久久电影网电视剧免费观看| 亚洲女性喷水在线观看一区| 久久综合九色综合久久久精品综合| 色综合久久天天| 国产一区二区三区免费在线观看| 亚洲精品国产一区二区三区四区在线| 日韩欧美123| 欧美天堂一区二区三区| 成人av网站在线观看免费| 久久国产日韩欧美精品| 一区二区三区中文在线| 国产精品亲子伦对白| 欧美日韩三级一区二区| 91亚洲国产成人精品一区二区三 | 欧洲精品一区二区三区在线观看| 国产一区二区中文字幕| 日韩va亚洲va欧美va久久| 亚洲乱码精品一二三四区日韩在线| 久久综合狠狠综合久久激情| 欧美日韩美女一区二区| 色哟哟一区二区在线观看| 高清国产一区二区三区| 韩国理伦片一区二区三区在线播放| 亚洲国产你懂的| 亚洲私人影院在线观看| 欧美国产亚洲另类动漫| 久久久99精品免费观看不卡| 日韩欧美在线网站| 欧美一区二视频| 欧美日本视频在线| 在线视频亚洲一区| 色天天综合久久久久综合片| av成人动漫在线观看| 成人综合婷婷国产精品久久蜜臀| 狠狠色丁香九九婷婷综合五月| 免费在线视频一区| 免费不卡在线观看| 另类欧美日韩国产在线| 另类综合日韩欧美亚洲| 久久精品99国产精品| 久久精品久久综合| 久久精品国产亚洲高清剧情介绍| 免费不卡在线视频| 久久成人免费日本黄色| 国产乱码精品一区二区三| 国产精品一区二区男女羞羞无遮挡 | 在线观看www91| 欧美日韩精品欧美日韩精品一| 精品视频一区三区九区| 91精品国产综合久久蜜臀| 欧美一区二区视频观看视频| 日韩欧美国产系列| www国产亚洲精品久久麻豆| 久久久精品国产免费观看同学| 中文av一区二区| 亚洲免费观看在线观看| 亚洲成人av在线电影| 久久国产精品无码网站| 国产精品1区2区| 99国内精品久久| 精品1区2区3区| 欧美不卡一区二区三区| 国产女主播一区| 樱桃国产成人精品视频| 日本免费新一区视频| 韩国女主播成人在线| 99久久久精品免费观看国产蜜| 色婷婷综合视频在线观看| 欧美视频在线一区| 久久中文字幕电影| 椎名由奈av一区二区三区| 丝袜美腿亚洲综合| 精品在线观看免费| 91网站最新地址| 日韩视频中午一区| 一区免费观看视频| 丝袜美腿亚洲综合| voyeur盗摄精品| 欧美日韩久久久| 国产欧美精品国产国产专区 | 91色porny在线视频| 欧美日本一区二区在线观看| 久久青草国产手机看片福利盒子| 亚洲免费资源在线播放| 美日韩一区二区三区| 色综合天天综合网国产成人综合天| 欧美另类z0zxhd电影| 欧美激情一区二区三区不卡| 丝袜a∨在线一区二区三区不卡| 国产成人av一区二区三区在线| 一本大道久久a久久综合| 精品毛片乱码1区2区3区| 亚洲视频精选在线| 国产一区二区三区美女| 欧美日韩国产精品自在自线| 中文一区二区完整视频在线观看| 视频一区视频二区在线观看| 不卡视频一二三| 精品福利av导航| 视频一区国产视频| 在线一区二区三区四区五区| 国产免费成人在线视频| 麻豆成人在线观看| 欧美日韩精品一二三区| 亚洲日本va午夜在线影院| 国产最新精品免费| 91精品国产综合久久香蕉麻豆| 一区二区三区精品视频在线| 成人激情黄色小说| 久久精品视频一区二区三区| 麻豆国产一区二区| 91麻豆精品91久久久久久清纯| 一区二区三区在线免费播放| 成人精品在线视频观看| 国产亚洲1区2区3区| 狠狠色狠狠色综合日日91app| 欧美一区二区三区影视| 亚洲福利视频一区| 91福利国产成人精品照片| 亚洲人成小说网站色在线| 成人免费福利片| 中文字幕第一页久久| 成人综合在线网站| 中文av一区二区| av电影在线不卡| 国产精品不卡一区| 99re这里只有精品首页| 综合久久久久久| 91亚洲精品久久久蜜桃网站| 亚洲另类在线视频| 欧美亚洲尤物久久| 亚洲1区2区3区4区| 88在线观看91蜜桃国自产| 石原莉奈一区二区三区在线观看| 欧美日韩国产综合草草| 亚洲国产裸拍裸体视频在线观看乱了| 91搞黄在线观看| 日韩黄色在线观看| 精品剧情v国产在线观看在线| 麻豆精品精品国产自在97香蕉| 精品99999| 粉嫩欧美一区二区三区高清影视| 国产精品视频看| 日本乱码高清不卡字幕| 性欧美疯狂xxxxbbbb| 欧美一区二区三区四区五区| 久久精品国产一区二区三区免费看| 精品久久五月天| 国产成人精品一区二| 亚洲老司机在线| 91精选在线观看| 国产老肥熟一区二区三区| 国产精品成人一区二区艾草| 欧美色图激情小说| 乱一区二区av| 国产精品你懂的在线| 欧美自拍偷拍午夜视频| 久热成人在线视频| 中文字幕在线不卡| 884aa四虎影成人精品一区| 高清在线成人网|