⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 qabstractfileengine.cpp

📁 qt-x11-opensource-src-4.1.4.tar.gz源码
💻 CPP
📖 第 1 页 / 共 2 页
字号:
    return false;}/*!    Copies the contents of this file to a file with the name \a newName.    Returns true on success; otherwise, false is returned.*/bool QAbstractFileEngine::copy(const QString &newName){    Q_UNUSED(newName);    return false;}/*!    Requests that the file be renamed to \a newName in the file    system. If the operation succeeds return true; otherwise return    false.    This virtual function must be reimplemented by all subclasses.    \sa setFileName() */bool QAbstractFileEngine::rename(const QString &newName){    Q_UNUSED(newName);    return false;}/*!    Creates a link from the file currently specified by fileName() to    \a newName. What a link is depends on the underlying filesystem    (be it a shortcut on Windows or a symbolic link on Unix). Returns    true if successful; otherwise returns false.*/bool QAbstractFileEngine::link(const QString &newName){    Q_UNUSED(newName);    return false;}/*!    Requests that the directory \a dirName be created. If    \a createParentDirectories is true, then any sub-directories in \a dirName    that don't exist must be created. If \a createParentDirectories is false then    any sub-directories in \a dirName must already exist for the function to    succeed. If the operation succeeds return true; otherwise return    false.    This virtual function must be reimplemented by all subclasses.    \sa setFileName() rmdir() isRelativePath() */bool QAbstractFileEngine::mkdir(const QString &dirName, bool createParentDirectories) const{    Q_UNUSED(dirName);    Q_UNUSED(createParentDirectories);    return false;}/*!    Requests that the directory \a dirName is deleted from the file    system. When \a recurseParentDirectories is true, then any empty    parent-directories in \a dirName must also be deleted. If    \a recurseParentDirectories is false, only the \a dirName leaf-node    should be deleted. In most file systems a directory cannot be deleted    using this function if it is non-empty. If the operation succeeds    return true; otherwise return false.    This virtual function must be reimplemented by all subclasses.    \sa setFileName() remove() mkdir() isRelativePath() */bool QAbstractFileEngine::rmdir(const QString &dirName, bool recurseParentDirectories) const{    Q_UNUSED(dirName);    Q_UNUSED(recurseParentDirectories);    return false;}/*!    Requests that the file be set to size \a size. If \a size is larger    than the current file then it is filled with 0's, if smaller it is    simply truncated. If the operations succceeds return true; otherwise    return false;    This virtual function must be reimplemented by all subclasses.    \sa size()*/bool QAbstractFileEngine::setSize(qint64 size){    Q_UNUSED(size);    return false;}/*!    Should return true if the underlying file system is case-sensitive;    otherwise return false.    This virtual function must be reimplemented by all subclasses. */bool QAbstractFileEngine::caseSensitive() const{    return false;}/*!    Return true if the file referred to by this file engine has a    relative path; otherwise return false.    This virtual function must be reimplemented by all subclasses.    \sa setFileName() */bool QAbstractFileEngine::isRelativePath() const{    return false;}/*!    Requests that a list of all the files matching the \a filters    list based on the \a filterNames in the file engine's directory    are returned.    Should return an empty list if the file engine refers to a file    rather than a directory, or if the directory is unreadable or does    not exist or if nothing matches the specifications.    This virtual function must be reimplemented by all subclasses.    \sa setFileName() */QStringList QAbstractFileEngine::entryList(QDir::Filters filters, const QStringList &filterNames) const{    Q_UNUSED(filters);    Q_UNUSED(filterNames);    return QStringList();}/*!    This function should return the set of OR'd flags that are true    for the file engine's file, and that are in the \a type's OR'd    members.    In your reimplementation you can use the \a type argument as an    optimization hint and only return the OR'd set of members that are    true and that match those in \a type; in other words you can    ignore any members not mentioned in \a type, thus avoiding some    potentially expensive lookups or system calls.    This virtual function must be reimplemented by all subclasses.    \sa setFileName()*/QAbstractFileEngine::FileFlags QAbstractFileEngine::fileFlags(FileFlags type) const{    Q_UNUSED(type);    return 0;}/*!    Requests that the file's permissions be set to \a perms. The argument    perms will be set to the OR-ed together combination of    QAbstractFileEngine::FileInfo, with only the QAbstractFileEngine::PermsMask being    honored. If the operations succceeds return true; otherwise return    false;    This virtual function must be reimplemented by all subclasses.    \sa size()*/bool QAbstractFileEngine::setPermissions(uint perms){    Q_UNUSED(perms);    return false;}/*!    Return  the file engine's current file name in the format    specified by \a file.    If you don't handle some \c FileName possibilities, return the    file name set in setFileName() when an unhandled format is    requested.    This virtual function must be reimplemented by all subclasses.    \sa setFileName(), FileName */QString QAbstractFileEngine::fileName(FileName file) const{    Q_UNUSED(file);    return QString();}/*!    If \a owner is \c OwnerUser return the ID of the user who owns    the file. If \a owner is \c OwnerGroup return the ID of the group    that own the file. If you can't determine the owner return -2.    This virtual function must be reimplemented by all subclasses.    \sa owner() setFileName(), FileOwner */uint QAbstractFileEngine::ownerId(FileOwner owner) const{    Q_UNUSED(owner);    return 0;}/*!    If \a owner is \c OwnerUser return the name of the user who owns    the file. If \a owner is \c OwnerGroup return the name of the group    that own the file. If you can't determine the owner return    QString().    This virtual function must be reimplemented by all subclasses.    \sa ownerId() setFileName(), FileOwner */QString QAbstractFileEngine::owner(FileOwner owner) const{    Q_UNUSED(owner);    return QString();}/*!    If \a time is \c CreationTime, return when the file was created.    If \a time is \c ModificationTime, return when the file was most    recently modified. If \a time is \c AccessTime, return when the    file was most recently accessed (e.g. read or written).    If the time cannot be determined return QDateTime() (an invalid    date time).    This virtual function must be reimplemented by all subclasses.    \sa setFileName(), QDateTime, QDateTime::isValid(), FileTime */QDateTime QAbstractFileEngine::fileTime(FileTime time) const{    Q_UNUSED(time);    return QDateTime();}/*!    Sets the file engine's file name to \a file. This file name is the    file that the rest of the virtual functions will operate on.    This virtual function must be reimplemented by all subclasses.    \sa rename() */void QAbstractFileEngine::setFileName(const QString &file){    Q_UNUSED(file);}/*!    Returns the native file handle for this file engine. This handle must be    used with care; its value and type are platform specific, and using it    will most likely lead to non-portable code.*/int QAbstractFileEngine::handle() const{    return -1;}/*!    \internal*/QAbstractFileEngine::Iterator *QAbstractFileEngine::beginEntryList(QDir::Filters filters, const QStringList &filterNames){    Q_UNUSED(filters);    Q_UNUSED(filterNames);    return 0;}/*!    \internal*/QAbstractFileEngine::Iterator *QAbstractFileEngine::endEntryList(){    return 0;}/*!    Reads a number of characters from the file into \a data. At most    \a maxlen characters will be read.    Returns -1 if a fatal error occurs, or 0 if there are no bytes to    read.*/qint64 QAbstractFileEngine::read(char *data, qint64 maxlen){    Q_UNUSED(data);    Q_UNUSED(maxlen);    return -1;}/*!    Writes \a len bytes from \a data to the file. Returns the number    of characters written on success; otherwise returns -1.*/qint64 QAbstractFileEngine::write(const char *data, qint64 len){    Q_UNUSED(data);    Q_UNUSED(len);    return -1;}/*!    This function reads one line, terminated by a '\n' character, from the    file info \a data. At most \a maxlen characters will be read. The    end-of-line character is included.*/qint64 QAbstractFileEngine::readLine(char *data, qint64 maxlen){    qint64 readSoFar = 0;    while (readSoFar < maxlen) {        char c;        qint64 readResult = read(&c, 1);        if (readResult <= 0)            return (readSoFar > 0) ? readSoFar : readResult;        ++readSoFar;        *data++ = c;        if (c == '\n')            return readSoFar;    }    return readSoFar;}/*!   \internal   \enum QAbstractFileEngine::Extension*//*!   \internal   \class QAbstractFileEngine::ExtensionOption*//*!   \internal   \class QAbstractFileEngine::ExtensionReturn*//*!    \internal*/bool QAbstractFileEngine::extension(Extension extension, const ExtensionOption *option, ExtensionReturn *output){    Q_UNUSED(extension);    Q_UNUSED(option);    Q_UNUSED(output);    return false;}/*!    \internal*/bool QAbstractFileEngine::supportsExtension(Extension extension) const{    Q_UNUSED(extension);    return false;}/*!  Returns the QFile::FileError that resulted from the last failed  operation. If QFile::UnspecifiedError is returned, QFile will  use its own idea of the error status.  \sa QFile::FileError, errorString() */QFile::FileError QAbstractFileEngine::error() const{    Q_D(const QAbstractFileEngine);    return d->fileError;}/*!  Returns the human-readable message appropriate to the current error  reported by error(). If no suitable string is available, an  empty string is returned.  \sa error() */QString QAbstractFileEngine::errorString() const{    Q_D(const QAbstractFileEngine);    return d->errorString;}/*!    Sets the error type to \a error, and the error string to \a errorString.    Call this function to set the error values returned by the higher-level    classes.    \sa QFile::error(), QIODevice::errorString(), QIODevice::setErrorString()*/void QAbstractFileEngine::setError(QFile::FileError error, const QString &errorString){    Q_D(QAbstractFileEngine);    d->fileError = error;    d->errorString = errorString;}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -