Introduction

The purpose of this component is to offer an easy way to perform certain file operations, like rename, append and delete.

This TdvFileX component is a part of the TORDIVEL SOFTWARE SOLUTIONS.

TdvFileX is copyright of TORDIVEL AS 2002.

11 April 2002, Oslo, Norway.

Help Index

•	The Package

•	Properties

•	Methods

•	Events

•	Using the component


The Package

The package consists of

•	Tdv_FileX.ocx (the component)

•	ReadMe.txt (readme file)

•	TdvFileX.hlp (help file)

•	TdvFileXTest.exe (test program)


Properties

Name	Type	RW	Description
ConfigXML	WideString	RW	The complete configuration in SPB-XML format.
FileName	WideString	RW	The name of the file on which the operations are performed.
MaxSize	WideString	RW	The maximum allowed size of the file. Undefined if empty.


Methods

Name	Parameters	Description
Delete	FileName	Deletes the file, if not read only
Rename	FileName: WideString; NewFileName: WideString	Renames the file. Fails if FileName does not exist or NewFileName exists.
AddLine	FileName: WideString; Line: WideString; MaxSize: WideString	Adds a line to the file. Fails if the file’s size would become larger than MaxSize, of it it is read only. The file is created if it doesn’t exist.
CreateDirectory	Name: WideString	Creates a new directory
DeleteDirectory	Name: WideString	Deletes an empty directory
SetLicence	Licence: WideString
AboutBox		Shows the About box


Events

Name	Parameters	Description
OnSuccess		Occurs when a file operation succeeds.
OnError	ErrorCode: integer; Description: WideString	Occurs when a file operation fails. ErrorCode = 0: Could not delete file ErrorCode = 1: File is read only ErrorCode = 2: File does not exist ErrorCode = 3: File already exist ErrorCode = 4: Could not rename file ErrorCode = 5: The file’s maximum size has been reached ErrorCode = 6: Could not create directory ErrorCode = 7: Could not delete directory


Using the component

In order to use the component, simply drop it on a form, configure it, and you are ready to perform file operations.

The component consists of the following tabs:

•	General

•	Log

•	About


General

Enter the file’s names, max size, and line to add, and press the buttons to perform the file operations. If Max size is empty it is undefined.


Log

All performed file operations and error messages are shown in the log.


About

Pressing the Licence information button displays the component’s licence information.


Licence information


TORDIVEL SOFTWARE SOLUTIONS

TORDIVEL AS Software House is developing a portfolio of Windows NT/2000 software components and solutions with the following properties:

•	Simple and easy to use

•	Very high quality

•	Requirements from real use cases

•	Easy to deploy

•	"Simply working"

•	Network applications building blocks

Important keywords are: HTTP, TCP/IP, XML, and stateless servers.

These components and solutions are divided into two categories:

•	Professional Software Components

•	Freeware Components Library

We distribute the components and solutions to promote the skills of the experienced developers working at TORDIVEL and want to establish links to developers and companies all over the world.

If you have comments/suggestions your feedback is more than appreciated. Please contact us.

Storgata 20 N-0184 OSLO NORWAY
Telefax +47 2315 8701 Telephone +47 2315 8700
E-mail: office@tordivel.com Web: http://www.tordivel.com


Copyright Notice

(c) 2002 TdvFileX is copyright of

Storgata 20 N-0184 OSLO NORWAY
Telefax +47 2315 8701 Telephone +47 2315 8700
E-mail: office@tordivel.com Web: http://www.tordivel.com