.TH "KShred" kde3 "11 Jun 2005" "Version Version 3.4.1" "kio Library" \" -*- nroff -*-
.ad l
.nh
.SH NAME
KShred \- 
.SH SYNOPSIS
.br
.PP
\fC#include <kshred.h>\fP
.PP
Inherits \fBQObject\fP.
.PP
.SS "Signals"

.in +1c
.ti -1c
.RI "void \fBprocessedSize\fP (\fBKIO::filesize_t\fP bytes)"
.br
.ti -1c
.RI "void \fBinfoMessage\fP (const \fBQString\fP &message)"
.br
.in -1c
.SS "Public Member Functions"

.in +1c
.ti -1c
.RI "\fBKShred\fP (\fBQString\fP fileName)"
.br
.ti -1c
.RI "bool \fBfill1s\fP ()"
.br
.ti -1c
.RI "bool \fBfill0s\fP ()"
.br
.ti -1c
.RI "bool \fBfillbyte\fP (unsigned int byte)"
.br
.ti -1c
.RI "bool \fBfillrandom\fP ()"
.br
.ti -1c
.RI "bool \fBfillpattern\fP (unsigned char *pattern, unsigned int size)"
.br
.ti -1c
.RI "bool \fBshred\fP ()"
.br
.in -1c
.SS "Static Public Member Functions"

.in +1c
.ti -1c
.RI "static bool \fBshred\fP (\fBQString\fP fileName)"
.br
.in -1c
.SH "Detailed Description"
.PP 
\fBDeprecated\fP
.RS 4
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.
.RE
.PP
\fBAuthor:\fP
.RS 4
Andreas F. Pour <bugs@mieterra.com> 
.PP
David Faure <faure@kde.org> (integration into \fBKDE\fP and progress signal) 
.RE
.PP

.PP
Definition at line 45 of file kshred.h.
.SH "Constructor & Destructor Documentation"
.PP 
.SS "KShred::KShred (\fBQString\fP fileName)"
.PP
Initialize the class using the name of the file to 'shred'. 
.PP
\fBParameters:\fP
.RS 4
\fIfileName\fP fully qualified name of the file to shred.
.RE
.PP

.PP
Definition at line 31 of file kshred.cpp.
.PP
References endl(), QString::isEmpty(), kdError(), QString::local8Bit(), QFile::open(), QFile::setName(), and QFile::size().
.SH "Member Function Documentation"
.PP 
.SS "bool KShred::fill1s ()"
.PP
Writes all 1's over the entire file and flushes the file buffers. 
.PP
\fBReturns:\fP
.RS 4
true on success, false on error (invalid filename or write error)
.RE
.PP

.PP
Definition at line 68 of file kshred.cpp.
.PP
References fillbyte().
.SS "bool KShred::fill0s ()"
.PP
Writes all 0's over the entire file and flushes the file buffers. 
.PP
\fBReturns:\fP
.RS 4
true on success, false on error (invalid filename or write error)
.RE
.PP

.PP
Definition at line 75 of file kshred.cpp.
.PP
References fillbyte().
.SS "bool KShred::fillbyte (unsigned int byte)"
.PP
Writes the specified byte over the entire file and flushes the file buffers. 
.PP
\fBParameters:\fP
.RS 4
\fIbyte\fP the value to write over every byte of the file 
.RE
.PP
\fBReturns:\fP
.RS 4
true on success, false on error (invalid filename or write error)
.RE
.PP

.PP
Definition at line 82 of file kshred.cpp.
.PP
References flush().
.PP
Referenced by fill0s(), fill1s(), and shred().
.SS "bool KShred::fillrandom ()"
.PP
Writes random bites over the entire file and flushes the file buffers. 
.PP
\fBReturns:\fP
.RS 4
true on success, false on error (invalid filename or write error)
.RE
.PP

.PP
Definition at line 122 of file kshred.cpp.
.PP
References flush().
.PP
Referenced by shred().
.SS "bool KShred::fillpattern (unsigned char * pattern, unsigned int size)"
.PP
Writes the specified byte array over the entire file and flushes the file buffers. 
.PP
\fBParameters:\fP
.RS 4
\fIpattern\fP the value to write over the entire file 
.br
\fIsize\fP the length of the 'pattern' byte array 
.RE
.PP
\fBReturns:\fP
.RS 4
true on success, false on error (invalid filename or write error)
.RE
.PP

.PP
Definition at line 103 of file kshred.cpp.
.PP
References flush().
.PP
Referenced by shred().
.SS "bool KShred::shred ()"
.PP
Shreds a file by writing a series of values over it (uses \fBfill0s\fP, then fill1s, then fillrandom, then fillbyte with 0101..., then fillbyte with 1010.... 
.PP
\fBReturns:\fP
.RS 4
true on success, false on error (invalid filename or write error) 
.RE
.PP

.PP
Definition at line 207 of file kshred.cpp.
.PP
References QString::arg(), fillbyte(), fillpattern(), fillrandom(), infoMessage(), processedSize(), and QFile::remove().
.PP
Referenced by shred().
.SS "bool KShred::shred (\fBQString\fP fileName)\fC [static]\fP"
.PP
The simplest method to shred a file. 
.PP
No need to create an instance of the class. 
.PP
\fBParameters:\fP
.RS 4
\fIfileName\fP fully qualified name of the file to shred. 
.RE
.PP

.PP
Definition at line 149 of file kshred.cpp.
.PP
References QString::isEmpty(), and shred().
.SS "void KShred::processedSize (\fBKIO::filesize_t\fP bytes)\fC [signal]\fP"
.PP
Shows progress of the shredding. 
.PP
\fBParameters:\fP
.RS 4
\fIbytes\fP the number of bytes written to the file 
.RE
.PP

.PP
Referenced by shred().
.SS "void KShred::infoMessage (const \fBQString\fP & message)\fC [signal]\fP"
.PP
Shows a message in the progress dialog. 
.PP
\fBParameters:\fP
.RS 4
\fImessage\fP the message to display 
.RE
.PP

.PP
Referenced by shred().

.SH "Author"
.PP 
Generated automatically by Doxygen for kio Library from the source code.
