Schon in der Hilfe geguckt? Da die Klasse keine entsprechende Eigenschaft besitzt (Delphi 6), wohl her nicht. Und warum willst du sie dir nicht merken? Ansonsten entsprechend nachrüsten:
Delphi-Quellcode:
type
TMyFileStream = class(TFileStream)
private
FFilename: String;
function GetFilename: String;
procedure SetFilename(Filename: String);
public
constructor Create(const FileName: string; Mode: Word); overload;
property Filename: string read GetFilename write SetFilename;
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
function TMyFileStream.GetFilename: String;
begin
Result := FFilename;
end;
procedure TMyFileStream.SetFilename(Filename: String);
begin
FFilename := Filename;
end;
constructor TMyFileStream.Create(const FileName: string; Mode: Word);
begin
inherited Create(Filename, Mode);
FFilename := Filename;
end;
procedure TForm1.Button1Click(Sender: TObject);
var
MyFileStream: TMyFileStream;
begin
MyFileStream := TMyFileStream.Create('d:\test.txt', fmCreate);
try
ShowMessage(MyFileStream.Filename);
finally
FreeAndNil(MyFileStream);
end;
end;