• Skip to content
  • Skip to link menu
KDE 3.5 API Reference
  • KDE API Reference
  • API Reference
  • Sitemap
  • Contact Us
 

kio

KShred Class Reference

#include <kshred.h>

Inheritance diagram for KShred:

Inheritance graph
[legend]

List of all members.


Signals

void infoMessage (const QString &message)
void processedSize (KIO::filesize_t bytes)

Public Member Functions

bool fill0s ()
bool fill1s ()
bool fillbyte (unsigned int byte)
bool fillpattern (unsigned char *pattern, unsigned int size)
bool fillrandom ()
 KShred (QString fileName)
bool shred ()
 ~KShred ()

Static Public Member Functions

static bool shred (QString fileName)

Detailed Description

Deprecated:
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.
Author:
Andreas F. Pour <bugs@mieterra.com>

David Faure <faure@kde.org> (integration into KDE and progress signal)

Definition at line 45 of file kshred.h.


Constructor & Destructor Documentation

KShred::KShred ( QString  fileName  ) 

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

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

Definition at line 31 of file kshred.cpp.

KShred::~KShred (  ) 

Definition at line 60 of file kshred.cpp.


Member Function Documentation

bool KShred::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)

Definition at line 75 of file kshred.cpp.

bool KShred::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)

Definition at line 68 of file kshred.cpp.

bool KShred::fillbyte ( unsigned int  byte  ) 

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)

Definition at line 82 of file kshred.cpp.

bool KShred::fillpattern ( unsigned char *  pattern,
unsigned 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)

Definition at line 103 of file kshred.cpp.

bool KShred::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)

Definition at line 122 of file kshred.cpp.

void KShred::infoMessage ( const QString &  message  )  [signal]

Shows a message in the progress dialog.

Parameters:
message the message to display

void KShred::processedSize ( KIO::filesize_t  bytes  )  [signal]

Shows progress of the shredding.

Parameters:
bytes the number of bytes written to the file

bool KShred::shred ( QString  fileName  )  [static]

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.

Definition at line 149 of file kshred.cpp.

bool KShred::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)

Definition at line 207 of file kshred.cpp.


The documentation for this class was generated from the following files:
  • kshred.h
  • kshred.cpp

kio

Skip menu "kio"
  • Main Page
  • Modules
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

API Reference

Skip menu "API Reference"
  • dcop
  • DNSSD
  • interfaces
  • Kate
  • kconf_update
  • KDECore
  • KDED
  • kdefx
  • KDEsu
  • kdeui
  • KDocTools
  • KHTML
  • KImgIO
  • KInit
  • kio
  • kioslave
  • KJS
  • KNewStuff
  • KParts
  • KUtils
Generated for API Reference by doxygen 1.5.9
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal