org.kde.koala
public class KSaveFile extends Object implements QtSupport
UNKNOWN: The KSaveFile class has been made to write out changes to an existing file atomically.
Constructor Summary | |
---|---|
protected | KSaveFile(Class dummy) |
KSaveFile(String filename, int mode)
Creates a new KSaveFile with the given file name. | |
KSaveFile(String filename) |
Method Summary | |
---|---|
void | abort()
Aborts the write operation and removes any intermediate files
This implies a close. |
static boolean | backupFile(String filename, String backupDir, String backupExtension)
Static method to create a backup file before saving.
|
static boolean | backupFile(String filename, String backupDir) |
static boolean | backupFile(String filename) |
boolean | close()
Closes the file and makes the changes definitive.
|
QDataStream | dataStream()
A QDataStream open for writing to the file. |
void | dispose() Delete the wrapped C++ instance ahead of finalize() |
QFile | file()
A QFile open for writing to the file. |
protected void | finalize() Deletes the wrapped C++ instance |
int | handle()
An integer file descriptor open for writing to the file. |
boolean | isDisposed() Has the wrapped C++ instance been deleted? |
String | name()
The name of the file as passed to the constructor. |
int | status()
Returns the status of the file based on errno. (see errno.h)
0 means OK.
|
QTextStream | textStream()
A QTextStream open for writing to the file. |
Parameters: filename the path of the file mode the mode of the file (see chmod(1))
UNKNOWN: Creates a new KSaveFile with the given file name.
UNKNOWN: Aborts the write operation and removes any intermediate files This implies a close.
Parameters: filename the file to backup backupDir optional directory where to save the backup file in.
If empty (the default), the backup will be in the same directory as filename.
backupExtension the extension to append to filename
, "~" by default.
UNKNOWN: Static method to create a backup file before saving.
Returns: true if successful, or false if an error has occurred.
UNKNOWN: Closes the file and makes the changes definitive.
Returns: A QDataStream that is open for writing to the file, or 0 if opening the file failed
UNKNOWN: A QDataStream open for writing to the file.
Returns: A QFile open for writing to the file, or 0 if opening the temporary file failed.
UNKNOWN: A QFile open for writing to the file.
Returns: The file descriptor, or a negative number if opening the temporary file failed
UNKNOWN: An integer file descriptor open for writing to the file.
Returns: The name of the file, or null if opening the file has failed
UNKNOWN: The name of the file as passed to the constructor.
Returns: the errno status, 0 means ok
UNKNOWN: Returns the status of the file based on errno.
Returns: A QTextStream that is open for writing to the file, or 0 if opening the temporary file failed
UNKNOWN: A QTextStream open for writing to the file.