|
Krita Source Code Documentation
|
#include <KoDirectoryStore.h>
Inheritance diagram for KoDirectoryStore:Public Member Functions | |
| KoDirectoryStore (const QString &path, Mode _mode, bool writeMimetype) | |
| ~KoDirectoryStore () override | |
Public Member Functions inherited from KoStore | |
| bool | atEnd () const |
| bool | bad () const |
| bool | close () |
| QString | currentPath () const |
| QIODevice * | device () const |
| virtual QStringList | directoryList () const |
| virtual bool | enterDirectory (const QString &directory) |
| bool | extractFile (const QString &sourceName, QByteArray &data) |
| bool | finalize () |
| bool | hasDirectory (const QString &directoryName) |
| bool | hasFile (const QString &fileName) const |
| bool | isOpen () const |
| bool | leaveDirectory () |
| Mode | mode () const |
| bool | open (const QString &name) |
| void | popDirectory () |
| qint64 | pos () const |
| void | pushDirectory () |
| qint64 | read (char *buffer, qint64 length) |
| QByteArray | read (qint64 max) |
| bool | seek (qint64 pos) |
| See QIODevice. | |
| virtual void | setCompressionEnabled (bool e) |
| void | setSubstitution (const QString &name, const QString &substitution) |
| When reading, in the paths in the store where name occurs, substitution is used. | |
| qint64 | size () const |
| virtual qint64 | write (const char *data, qint64 length) |
| qint64 | write (const QByteArray &data) |
| virtual | ~KoStore () |
Protected Member Functions | |
| bool | closeRead () override |
| bool | closeWrite () override |
| bool | enterAbsoluteDirectory (const QString &path) override |
| bool | enterRelativeDirectory (const QString &dirName) override |
| bool | fileExists (const QString &absPath) const override |
| void | init () |
| bool | openRead (const QString &name) override |
| bool | openReadOrWrite (const QString &name, QIODevice::OpenModeFlag ioMode) |
| bool | openWrite (const QString &name) override |
Protected Member Functions inherited from KoStore | |
| virtual bool | doFinalize () |
| KoStore (Mode mode, bool writeMimetype=true) | |
Private Attributes | |
| QString | m_basePath |
| QString | m_currentPath |
| QFile * | m_file |
Additional Inherited Members | |
Public Types inherited from KoStore | |
| enum | Backend { Auto , Zip , Directory } |
| enum | Mode { Read , Write } |
Static Public Member Functions inherited from KoStore | |
| static KoStore * | createStore (const QString &fileName, Mode mode, const QByteArray &appIdentification=QByteArray(), Backend backend=Auto, bool writeMimetype=true) |
| static KoStore * | createStore (QIODevice *device, Mode mode, const QByteArray &appIdentification=QByteArray(), Backend backend=Auto, bool writeMimetype=true) |
Protected Attributes inherited from KoStore | |
| KoStorePrivate * | d_ptr |
Definition at line 14 of file KoDirectoryStore.h.
| KoDirectoryStore::KoDirectoryStore | ( | const QString & | path, |
| Mode | _mode, | ||
| bool | writeMimetype ) |
Definition at line 16 of file KoDirectoryStore.cpp.
References init().
|
override |
Definition at line 28 of file KoDirectoryStore.cpp.
|
inlineoverrideprotectedvirtual |
Implements KoStore.
Definition at line 27 of file KoDirectoryStore.h.
|
inlineoverrideprotectedvirtual |
Implements KoStore.
Definition at line 30 of file KoDirectoryStore.h.
|
overrideprotectedvirtual |
Enter a directory where we've been before. It is guaranteed to always exist.
Implements KoStore.
Definition at line 95 of file KoDirectoryStore.cpp.
References m_basePath, and m_currentPath.
|
overrideprotectedvirtual |
Enter a subdirectory of the current directory. The directory might not exist yet in Write mode.
Implements KoStore.
Definition at line 77 of file KoDirectoryStore.cpp.
References debugStore, m_currentPath, KoStore::mode(), and KoStore::Write.
|
overrideprotectedvirtual |
Check if a file exists inside the store.
| absPath | the absolute path inside the store, i.e. not relative to the current directory |
Implements KoStore.
Definition at line 104 of file KoDirectoryStore.cpp.
References debugStore, and m_basePath.
|
protected |
Definition at line 32 of file KoDirectoryStore.cpp.
References debugStore, m_basePath, m_currentPath, and KoStore::Write.
|
inlineoverrideprotectedvirtual |
Open the file name in the store, for reading. On success, this method must set m_stream to a stream from which we can read, as well as setting m_iSize to the size of the file.
| name | "absolute path" (in the archive) to the file to open |
Implements KoStore.
Definition at line 24 of file KoDirectoryStore.h.
References openReadOrWrite().
|
protected |
Definition at line 52 of file KoDirectoryStore.cpp.
References enterAbsoluteDirectory(), KoStore::enterDirectory(), m_basePath, KoStore::popDirectory(), KoStore::pos(), and KoStore::pushDirectory().
|
inlineoverrideprotectedvirtual |
Open the file name in the store, for writing On success, this method must set m_stream to a stream in which we can write.
| name | "absolute path" (in the archive) to the file to open |
Implements KoStore.
Definition at line 21 of file KoDirectoryStore.h.
References openReadOrWrite().
|
private |
Definition at line 40 of file KoDirectoryStore.h.
|
private |
Definition at line 43 of file KoDirectoryStore.h.
|
private |
Definition at line 46 of file KoDirectoryStore.h.