Logo Search packages:      
Sourcecode: qt4-x11 version File versions  Download package

Classes | Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes

QAbstractFileEngine Class Reference

The QAbstractFileEngine class provides an abstraction for accessing the filesystem. More...

Inheritance diagram for QAbstractFileEngine:
Inheritance graph
[legend]
Collaboration diagram for QAbstractFileEngine:
Collaboration graph
[legend]

List of all members.

Classes

class  ExtensionOption
 provides an extended input argument to QAbstractFileEngine's extension support. More...
class  ExtensionReturn
 provides an extended output argument to QAbstractFileEngine's extension support. More...
class  MapExtensionOption
class  MapExtensionReturn
class  UnMapExtensionOption

Public Types

enum  Extension { AtEndExtension, FastReadLineExtension, MapExtension, UnMapExtension }
enum  FileFlag {
  ReadOwnerPerm = 0x4000, WriteOwnerPerm = 0x2000, ExeOwnerPerm = 0x1000, ReadUserPerm = 0x0400,
  WriteUserPerm = 0x0200, ExeUserPerm = 0x0100, ReadGroupPerm = 0x0040, WriteGroupPerm = 0x0020,
  ExeGroupPerm = 0x0010, ReadOtherPerm = 0x0004, WriteOtherPerm = 0x0002, ExeOtherPerm = 0x0001,
  LinkType = 0x10000, FileType = 0x20000, DirectoryType = 0x40000, BundleType = 0x80000,
  HiddenFlag = 0x0100000, LocalDiskFlag = 0x0200000, ExistsFlag = 0x0400000, RootFlag = 0x0800000,
  Refresh = 0x1000000, PermsMask = 0x0000FFFF, TypesMask = 0x000F0000, FlagsMask = 0x0FF00000,
  FileInfoAll = FlagsMask | PermsMask | TypesMask
}
enum  FileName {
  DefaultName, BaseName, PathName, AbsoluteName,
  AbsolutePathName, LinkName, CanonicalName, CanonicalPathName,
  BundleName
}
enum  FileOwner { OwnerUser, OwnerGroup }
enum  FileTime { CreationTime, ModificationTime, AccessTime }
typedef QAbstractFileEngineIterator Iterator

Public Member Functions

bool atEnd () const
virtual IteratorbeginEntryList (QDir::Filters filters, const QStringList &filterNames)
virtual bool caseSensitive () const
virtual bool close ()
virtual bool copy (const QString &newName)
virtual IteratorendEntryList ()
virtual QStringList entryList (QDir::Filters filters, const QStringList &filterNames) const
QFile::FileError error () const
QString errorString () const
virtual bool extension (Extension extension, const ExtensionOption *option=0, ExtensionReturn *output=0)
virtual FileFlags fileFlags (FileFlags type=FileInfoAll) const
virtual QString fileName (FileName file=DefaultName) const
virtual QDateTime fileTime (FileTime time) const
virtual bool flush ()
virtual int handle () const
virtual bool isRelativePath () const
virtual bool isSequential () const
virtual bool link (const QString &newName)
uchar * map (qint64 offset, qint64 size, QFile::MemoryMapFlags flags)
virtual bool mkdir (const QString &dirName, bool createParentDirectories) const
virtual bool open (QIODevice::OpenMode openMode)
virtual QString owner (FileOwner) const
virtual uint ownerId (FileOwner) const
virtual qint64 pos () const
virtual qint64 read (char *data, qint64 maxlen)
virtual qint64 readLine (char *data, qint64 maxlen)
virtual bool remove ()
virtual bool rename (const QString &newName)
virtual bool rmdir (const QString &dirName, bool recurseParentDirectories) const
virtual bool seek (qint64 pos)
virtual void setFileName (const QString &file)
virtual bool setPermissions (uint perms)
virtual bool setSize (qint64 size)
virtual qint64 size () const
virtual bool supportsExtension (Extension extension) const
bool unmap (uchar *ptr)
virtual qint64 write (const char *data, qint64 len)
virtual ~QAbstractFileEngine ()

Static Public Member Functions

static QAbstractFileEnginecreate (const QString &fileName)

Protected Member Functions

 QAbstractFileEngine ()
 QAbstractFileEngine (QAbstractFileEnginePrivate &)
void setError (QFile::FileError error, const QString &str)

Protected Attributes

QAbstractFileEnginePrivated_ptr

Detailed Description

The QAbstractFileEngine class provides an abstraction for accessing the filesystem.

Since:
4.1

The QDir, QFile, and QFileInfo classes all make use of a QAbstractFileEngine internally. If you create your own QAbstractFileEngine subclass (and register it with Qt by creating a QAbstractFileEngineHandler subclass), your file engine will be used when the path is one that your file engine handles.

A QAbstractFileEngine refers to one file or one directory. If the referent is a file, the setFileName(), rename(), and remove() functions are applicable. If the referent is a directory the mkdir(), rmdir(), and entryList() functions are applicable. In all cases the caseSensitive(), isRelativePath(), fileFlags(), ownerId(), owner(), and fileTime() functions are applicable.

A QAbstractFileEngine subclass can be created to do synchronous network I/O based file system operations, local file system operations, or to operate as a resource system to access file based resources.

See also:
QAbstractFileEngineHandler

Definition at line 63 of file qabstractfileengine.h.


The documentation for this class was generated from the following files:

Generated by  Doxygen 1.6.0   Back to index