IFilename (File object)
1. Definition
The File object is of type IFilename and derives from ISlideShowObject. It contains a list of file names (incl. their paths) which are relevant for the parent object. The file names are of data type string.
IFilename inherits from ISlideShowObject function GetFilename(const Index: Integer): string; procedure SetFilename(const Index: Integer; const Filename: string); function GetAbsoluteFilename(const Index: Integer): string; procedure SetAbsoluteFilename(const Index: Integer; const Filename: string); function GetCount: Integer; procedure AddFilename(const Filename: String); procedure DeleteItem (const Index: Integer); function IndexOf(const Filename: string): Integer; procedure ChangeFilename(const OldFilename, NewFilename: string); end;
2. Methods
-
Getter and setter for the filename, as entered. They can be both relative and absolute.
function GetFilename(const Index: Integer): string; procedure SetFilename(const Index: Integer; const Filename: string);
-
Getters and setters for the expanded, i.e. absolute file name
function GetAbsoluteFilename(const Index: Integer): string; procedure SetAbsoluteFilename(const Index: Integer; const Filename: string);
-
Number of file names
function GetCount: Integer;
-
Adds file name to list
procedure AddFilename(const Filename: String);
-
Deletes file name from list
procedure DeleteItem (const Index: Integer);
-
Returns index of specific file name (-1 = nonexistent)
function IndexOf(const Filename: string): Integer;
-
Changes a file name. Expects old file name, looks up the respective entry and if found replaces it with the new file name.
procedure ChangeFilename(const OldFilename, NewFilename: string);