org.kde.koala

Class KShred

public class KShred extends QObject

Erase a file in a way that makes recovery impossible -- well, no guarentee of that, but at least as difficult as reasonably possible. For this, KShred write several times over the existing file, using different patterns, before deleting it. See KShredSignals for signals emitted by KShred

Author: David Faure (integration into KDE and progress signal)

UNKNOWN:

Constructor Summary
protected KShred(Class dummy)
KShred(String fileName)
Initialize the class using the name of the file to 'shred'.
Method Summary
StringclassName()
voiddispose()
Delete the wrapped C++ instance ahead of finalize()
booleanfill0s()
Writes all 0's over the entire file and flushes the file buffers.
booleanfill1s()
Writes all 1's over the entire file and flushes the file buffers.
booleanfillbyte(int arg1)
Writes the specified byte over the entire file and flushes the file buffers.
booleanfillpattern(short pattern, int size)
Writes the specified byte array over the entire file and flushes the file buffers.
booleanfillrandom()
Writes random bites over the entire file and flushes the file buffers.
protected voidfinalize()
Deletes the wrapped C++ instance
booleanisDisposed()
Has the wrapped C++ instance been deleted?
QMetaObjectmetaObject()
booleanshred()
Shreds a file by writing a series of values over it (uses #fill0s, then fill1s, then fillrandom, then fillbyte with 0101..., then fillbyte with 1010....
static booleanshred(String fileName)
The simplest method to shred a file.

Constructor Detail

KShred

protected KShred(Class dummy)

KShred

public KShred(String fileName)
Initialize the class using the name of the file to 'shred'.

Parameters: fileName fully qualified name of the file to shred.

UNKNOWN: Initialize the class using the name of the file to 'shred'.

Method Detail

className

public String className()

dispose

public void dispose()
Delete the wrapped C++ instance ahead of finalize()

fill0s

public boolean fill0s()
Writes all 0's over the entire file and flushes the file buffers.

Returns: true on success, false on error (invalid filename or write error)

UNKNOWN: Writes all 0's over the entire file and flushes the file buffers.

fill1s

public boolean fill1s()
Writes all 1's over the entire file and flushes the file buffers.

Returns: true on success, false on error (invalid filename or write error)

UNKNOWN: Writes all 1's over the entire file and flushes the file buffers.

fillbyte

public boolean fillbyte(int arg1)
Writes the specified byte over the entire file and flushes the file buffers.

Parameters: byte the value to write over every byte of the file

Returns: true on success, false on error (invalid filename or write error)

UNKNOWN: Writes the specified byte over the entire file and flushes the file buffers.

fillpattern

public boolean fillpattern(short pattern, int size)
Writes the specified byte array over the entire file and flushes the file buffers.

Parameters: pattern the value to write over the entire file size the length of the 'pattern' byte array

Returns: true on success, false on error (invalid filename or write error)

UNKNOWN: Writes the specified byte array over the entire file and flushes the file buffers.

fillrandom

public boolean fillrandom()
Writes random bites over the entire file and flushes the file buffers.

Returns: true on success, false on error (invalid filename or write error)

UNKNOWN: Writes random bites over the entire file and flushes the file buffers.

finalize

protected void finalize()
Deletes the wrapped C++ instance

isDisposed

public boolean isDisposed()
Has the wrapped C++ instance been deleted?

metaObject

public QMetaObject metaObject()

shred

public boolean shred()
Shreds a file by writing a series of values over it (uses #fill0s, then fill1s, then fillrandom, then fillbyte with 0101..., then fillbyte with 1010....

Returns: true on success, false on error (invalid filename or write error)

UNKNOWN: Shreds a file by writing a series of values over it (uses #fill0s, then fill1s, then fillrandom, then fillbyte with 0101.

shred

public static boolean shred(String fileName)
The simplest method to shred a file. No need to create an instance of the class.

Parameters: fileName fully qualified name of the file to shred.

UNKNOWN: The simplest method to shred a file.