Class Module 21 Members

File Operations Class

Entisoft Tools 2.0 Object Library · FileOperations · 19 Functions · 0 Properties · 1 Subroutines

Showing 21 of 21
Declarations
Declarations
Functions that operate upon files. Copyright 1998 Entisoft
Section
AppendStringToFile
Append String To File
Append a string to the named file. The file is created if it does not already exist. Function returns True upon success and False upon failure.
Function
Checksum16File
Checksum 16 File
"16-bit File Checksum" Finds the 16-bit checksum of a file. The checksum is the sum of the ASCII values of all of the characters within the file. Checksum is returned as a Long (Integer) value between 0 and 65,536. Uses modulo addition so that the function will return the 16 least significant bits of the sum.
Function
Checksum32File
Checksum 32 File
"32-bit File Checksum" Finds the 32-bit checksum of a file. The checksum is the sum of the ASCII values of all of the characters within the file. Checksum is returned as a Double (precision floating-point) value that is a non-negative integer. Uses modulo addition so that the function will return the 32 least significant bits of the sum.
Function
Checksum8File
Checksum 8 File
"8-bit File Checksum" Return the 8-bit checksum of a file. The checksum is the sum of the ASCII values of all of the characters within the file. Checksum is returned as a one-character string. Uses modulo addition so that the function will return the 8 least significant bits of the sum.
Function
ChecksumXFile
Checksum X File
"Exclusive Or ("XOR") File 'Checksum'" Generate a "checksum" by performing the Xor ("Exclusive Or") operation on each of the adjacent characters within a file. Checksum is returned as a one-character string. This is not really a "checksum" because that usually refers to sum of the ASCII values of the characters.
Function
CompareFiles
Compare Files
Compare two files to determine if they have the same contents. Return 0 if they are the same, Return 1 if they are different. Return -1 in case of most errors.
Function
CRC32File
CRC32 File
"File 32-bit Cyclical Redundancy Check (CRC)" Finds the PKZIP compatible CRC of any size file. Return the 32-bit CRC value for the characters within a file. Unlike a checksum, the position of the characters within file affects the result. Matching CRC values are a much more reliable indicator of the accuracy of data than matching checksum values.
Function
DebugMessage
Debug Message
Append a message to a "log" file, preceded by the current date and time. Function returns True upon success and False upon failure.
Function
FileCharacterFrequency
File Character Frequency
Count the frequency of each character within a file. Character counts are returned in a one-dimensional array of Variant values.
Function
FileExists
File Exists
Determine if the named file exists. Function returns True if the file exists. Function returns False if the file does not exist OR there was an error.
Function
FileToString
File To String
Read a file, returning its contents as a String. Function returns Null upon failure.
Function
FormatFileTable
Format File Table
Aligns all of the columns within a delimited table that is read from a file.
Function
KillIgnoreErrors
Kill Ignore Errors
Delete a file, ignoring any errors that may occur, such as when the file does not exist.
Function
NameAsBackup
Name As Backup
Rename a file by replacing the last character of the name with a hyphen ("-").
Function
NameBackupTarget
Name Backup Target
Rename a file and keep a backup of the target file if the target file already exists. Backup file has same name as target file except that last character is changed to a hyphen ("-").
Function
NameMaybeBackupInTemp
Name Maybe Backup In Temp
Rename a file, optionally making a backup of the target file in the Windows temporary directory.
Function
ReplaceStringInFile
Replace String In File
Combination file copy operation with text replacement. All occurrences of some string are replaced by another string. Function returns True upon success and False upon failure.
Function
SizeFile
Size File
Return the size in bytes (characters) of a file. Returns Null if the file name is Null. Returns -1 in case of errors.
Function
StringToFile
String To File
Write a string to the named file. The file is created if it does not already exist. Function returns True upon success and False upon failure.
Function
CRC32FileSample
CRC32 File Sample
View VB6 signature, parameters, and usage notes.
Sub