KDECore
ksavefile.cpp
Go to the documentation of this file.
1 /* kate: tab-indents off; replace-tabs on; tab-width 4; remove-trailing-space on; encoding utf-8;*/
400 sTemplate = backupDir + QLatin1Char('/') + fileInfo.fileName() + QLatin1String(".%1") + backupExtension;
407 const QStringList nameFilters = QStringList( fileInfo.fileName() + QLatin1String(".*") + backupExtension );
void message(KMessage::MessageType messageType, const QString &text, const QString &caption=QString())
Display a long message of a certain type.
Definition: kmessage.cpp:92
QString i18n(const char *text)
Returns a localized version of a string.
Definition: klocalizedstring.h:630
bool flush()
void setDirectWriteFallback(bool enabled)
Allows writing over the existing file if necessary.
Definition: ksavefile.cpp:275
void truncate(int position)
bool isWritable() const
void setNameFilters(const QStringList &nameFilters)
static QString realFilePath(const QString &filename)
Expands all symbolic links and resolves references to '/.
Definition: kstandarddirs.cpp:973
bool remove()
bool directWriteFallback() const
Returns true if the fallback solution for saving files in read-only directories is enabled...
Definition: ksavefile.cpp:280
QString errorString() const
QFile::Permissions permissions() const
void setFile(const QString &file)
int handle() const
bool rename(const QString &newName)
virtual bool open(OpenMode flags=QIODevice::ReadWrite)
Open the save file.
Definition: ksavefile.cpp:81
void setFileName(const QString &name)
bool setPermissions(QFlags< QFile::Permission > permissions)
FileError error() const
void setSorting(QFlags< QDir::SortFlag > sort)
bool copy(const QString &newName)
int lastIndexOf(QChar ch, int from, Qt::CaseSensitivity cs) const
QString filePath() const
void setFilter(QFlags< QDir::Filter > filters)
QString errorString() const
Returns a human-readable description of the last error.
Definition: ksavefile.cpp:190
QString fileName() const
void setAutoRemove(bool b)
QFileInfoList entryInfoList(QFlags< QDir::Filter > filters, QFlags< QDir::SortFlag > sort) const
bool isEmpty() const
void setFileTemplate(const QString &name)
bool endsWith(const QString &s, Qt::CaseSensitivity cs) const
bool isOpen() const
QDir dir() const
virtual bool open(QFlags< QIODevice::OpenModeFlag > mode)
uint groupId() const
QString toLower() const
bool exists() const
bool waitForStarted(int msecs)
void setWorkingDirectory(const QString &dir)
bool isRelativePath(const QString &path)
virtual void close()
QString fileName() const
QByteArray toLatin1() const
QString mid(int position, int n) const
static bool rcsBackupFile(const QString &filename, const QString &backupDir=QString(), const QString &backupMessage=QString())
Static method to create an rcs backup file for a given filename.
Definition: ksavefile.cpp:321
QString absolutePath() const
static QString findExe(const QString &appname, const QString &pathstr=QString(), SearchOptions options=NoSearchOptions)
Finds the executable in the system path.
Definition: kstandarddirs.cpp:1328
void setFileName(const QString &filename)
Set the target filename for the save file.
Definition: ksavefile.cpp:166
uint ownerId() const
QString absoluteFilePath(const QString &fileName) const
int length() const
qint64 write(const char *data, qint64 maxSize)
QString fromLatin1(const char *str, int size)
static bool numberedBackupFile(const QString &filename, const QString &backupDir=QString(), const QString &backupExtension=QString::fromLatin1("~"), const uint maxBackups=10)
Static method to create a backup file for a given filename.
Definition: ksavefile.cpp:388
QDir current()
static bool backupFile(const QString &filename, const QString &backupDir=QString())
Static method to create a backup file before saving.
Definition: ksavefile.cpp:285
void closeWriteChannel()
bool open()
QString arg(qlonglong a, int fieldWidth, int base, const QChar &fillChar) const
static bool simpleBackupFile(const QString &filename, const QString &backupDir=QString(), const QString &backupExtension=QLatin1String("~"))
Static method to create a backup file for a given filename.
Definition: ksavefile.cpp:305
T readEntry(const QString &key, const T &aDefault) const
Reads the value of an entry specified by pKey in the current group.
Definition: kconfiggroup.h:248
void start(const QString &program, const QStringList &arguments, QFlags< QIODevice::OpenModeFlag > mode)
uint toUInt(bool *ok, int base) const
bool waitForFinished(int msecs)
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:22:11 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:22:11 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.