Class TStringTree

Unit

StringTree

Declaration

type TStringTree = class(TObject)

Fields

Name Description
DirTree StringList for saving dir struct
FileList StringList for saving all file names

Methods

Overview

Public constructor Create;
Public destructor Destroy; override;
Public function AddToFileList( const co: integer; fileName: String): TStringTreeError;
Public procedure Clear;
Public function CreateDir( const path: String): TStringTreeError;
Public function CreateFile( const path, fileName: String): TStringTreeError;
Public function DeleteDir( const path: String): TStringTreeError;
Public function DeleteFile( const path, fileName: String): TStringTreeError;
Public function DeleteFiles( const path: String): TStringTreeError;
Public function DirExists( const path: String): Boolean;
Public function ErrorToStr( stringTreeError: TStringTreeError): String;
Public function FileDefined( const fileName: String): Boolean;
Public function FileExists( const path, fileName: String): Boolean;
Public function FindFile( const fileName: String; var stringList: TStringList): TStringTreeError;
Public function GetAllFiles( const path: String; var stringList: TStringList): TStringTreeError;
Public function GetCreationOrder( index: integer): integer;
Public function GetDirList( const path: String; var stringList: TStringList): TStringTreeError;
Public function GetDirTree( const path: String; var stringList: TStringList): TStringTreeError;
Public function GetFileCount: Integer;
Public function GetFileList( const path: String; var stringList: TStringList): TStringTreeError;
Public function GetParentPath( const path: String): String;
Public function LoadFromFile( fileName: String): TStringTreeError;
Public function SaveFileListToFile( const path, fileName: String): TStringTreeError;
Public function SaveToFile( fileName: String): TStringTreeError;

Description

constructor Create;
destructor Destroy; override;
function AddToFileList( const co: integer; fileName: String):

TStringTreeError;

Function will add creation order + fileName string to the FileList stringList

procedure Clear;

Function will clear DirTree and FileList

function CreateDir( const path: String):

TStringTreeError;

Function will defined a dir path

function CreateFile( const path, fileName: String):

TStringTreeError;

Funtion will define a new file name

function DeleteDir( const path: String):

TStringTreeError;

Function will remove dir path from DirTree, and remove all files and subdirectories DirTree and FileList

function DeleteFile( const path, fileName: String):

TStringTreeError;

Function will will remove path-fileName from FileList

function DeleteFiles( const path: String):

TStringTreeError;

Function will will remove all files for the dir path argument

function DirExists( const path: String): Boolean;

Function returns True if dir path is defined

function ErrorToStr( stringTreeError:

TStringTreeError): String;

Function will return a meaningful string for stringTreeError argument

function FileDefined( const fileName: String): Boolean;

Function will return True if fileName (without path) is defined

function FileExists( const path, fileName: String): Boolean;

Function will return True is path-filename is defined

function FindFile( const fileName: String; var stringList: TStringList):

TStringTreeError;

Function will fill stringList with all paths for fileName argument

function GetAllFiles( const path: String; var stringList: TStringList):

TStringTreeError;

Function will fill the stringList will all files in both path and subpath dir

function GetCreationOrder( index: integer): integer;

Function will return then CreationOrder integer saved in DirTree

function GetDirList( const path: String; var stringList: TStringList):

TStringTreeError;

Function will fill stringList with subdirectories (but not sub-subdirectories) for dir path argument

function GetDirTree( const path: String; var stringList: TStringList):

TStringTreeError;

Function will will fill the stringList with dir tree for dir path argument

function GetFileCount: Integer;

Function will return (real) file count for FileList

function GetFileList( const path: String; var stringList: TStringList):

TStringTreeError;

Function will fill stringList with all files for the dir path argument

function GetParentPath( const path: String): String;

Function returns parent path for path argument

function LoadFromFile( fileName: String):

TStringTreeError;

Function will read inifile into DirTree and FileList

function SaveFileListToFile( const path, fileName: String):

TStringTreeError;

Function will save FileList for dir path argument to inifile

function SaveToFile( fileName: String):

TStringTreeError;

Function will save DirTree and FileList to inifile


Generated by rjPasDoc 0.7 on Thu 7 Mar 2002 02:33:37