Reference FileSize
Declared in Codebot.System.pas on line 694
Get the size of a file in bytes
{ Delete a file }
function FileDelete(const FileName: string): Boolean;
{ Rename a file }
function FileRename(const OldName, NewName: String): Boolean;
{ Determine if a file exists }
function FileExists(const FileName: string): Boolean;
{ Get the size of a file in bytes }
function FileSize(const FileName: string): LargeWord;
{ Get the modified date of a file }
function FileDate(const FileName: string): TDateTime;
{ Extract the name portion of a file name }
function FileExtractName(const FileName: string): string;
{ Extract the name portion of a file name without its extension }
function FileExtractNameOnly(const FileName: string): string;
{ Extract the extension portion of a file name }
function FileExtractExt(const FileName: string): string;
{ Change the extension portion of a file name }
function FileChangeExt(const FileName, Extension: string): string;
{ Extract the path of a file or directory }
function FileExtractPath(const FileName: string): string;
{ Write the contents of a file }
procedure FileWriteStr(const FileName: string; const Contents: string);
{ Read the contents of a file }
function FileReadStr(const FileName: string): string;
{ Write a line to a file }
procedure FileWriteLine(const FileName: string; const Line: string);
{ Create a directory }
function DirCreate(const Dir: string): Boolean;
{ Change to a new directory }
procedure DirChange(const Dir: string);
{ Get the current working directory }
function DirGetCurrent: string;
{ Set the current working directory }
function DirSetCurrent(const Dir: string): Boolean;
{ Get the temporary directory }
function DirGetTemp(Global: Boolean = False): string;
{ Delete a directory or optionally only its contents }
function DirDelete(const Dir: string; OnlyContents: Boolean = False): Boolean;
{ Determine if a directory exists }
function DirExists(const Dir: string): Boolean;
{ Force a directory to exist }
function DirForce(const Dir: string): Boolean;
{ Change path delimiter to match system settings }
function PathAdjustDelimiters(const Path: string): string;
{ Combine two paths }
function PathCombine(const A, B: string; IncludeDelimiter: Boolean = False): string;
{ Expand a path to the absolute path }
function PathExpand(const Path: string): string;
{ Include the end delimiter for a path }
function PathIncludeDelimiter(const Path: string): string;
{ Exclude the end delimiter for a path }
function PathExcludeDelimiter(const Path: string): string;