Unit Fileman

Classes

Functions

AppExe - Return application exename
AppPath - return application path
CreateDirs - Create directories with 1 or more non-exists directories.
DirExists - check if directory exists or not
DirUp - this function ('a:\test.
ExtractFilepath - Noticed this function will not return '\' at all.
FileLastWrite -
FilenameOnly - Clear the memories.
formFilename - Form a full path filename avoid '\' error.
GetWinDir - Get windows directory
LastDir - Return the last dir in the Dir string.
SearchFileExt - Search file with the exxtention in a directory
TestWrite - Test write the directory if it is readonly.
TmpDir - Get the Temp dir.

Types

Constants

Variables

StopSearch


Functions


function AppExe: String;

Return application exename

function AppPath: String;

return application path

function CreateDirs(const Dirs: String) : Boolean;

Create directories with 1 or more non-exists directories.

function DirExists(const Dir: String): Boolean;

check if directory exists or not

function DirUp(Directory: String): String;

this function ('a:\test.txt'->'a:') Just like windows explorer go to the parent directory.

function ExtractFilepath(const Filename: TFilename): String;

Noticed this function will not return '\' at all. unlike delphi's function, it will return '\' when the file contain no dir only a drive. ('a:\test.txt'->'a:\'

function FileLastWrite(const Filename: String): Integer;


function FilenameOnly(const Filename: String): String;

Clear the memories.

function formFilename(const Dir, Filename: String): String;

Form a full path filename avoid '\' error.

function GetWinDir : String;

Get windows directory

function LastDir(Dir: String): String;

Return the last dir in the Dir string.

Delete it.


procedure SearchFileExt(const Dir, Ext: String; Files: TStrings);

Search file with the exxtention in a directory

function TestWrite(const Dir: String): Boolean;

Test write the directory if it is readonly.

function TmpDir: String;

Get the Temp dir.

Types


Constants


Variables

StopSearch : Boolean