mirror of
https://git.sr.ht/~rabbits/macintosh_cookbook
synced 2024-12-28 17:29:52 +00:00
28 lines
503 B
ObjectPascal
28 lines
503 B
ObjectPascal
program ExampleFileBinary;
|
|
|
|
var
|
|
globalRef: Integer;
|
|
|
|
procedure GetFile;
|
|
var
|
|
where: point;
|
|
prompt: Str255;
|
|
origName: Str255;
|
|
err: OSErr;
|
|
theReply: SFReply;
|
|
myEOF: longint;
|
|
begin
|
|
setpt(where, 0, 0);
|
|
prompt := 'Get resource File from';
|
|
origName := 'unknownFile';
|
|
SFGetFile(where, prompt, nil, -1, nil, nil, theReply);
|
|
err := FSOpen(theReply.fname, theReply.vRefNum, globalRef);
|
|
err := GetEOF(globalRef, myEOF);
|
|
err := FSClose(globalRef);
|
|
end;
|
|
|
|
begin
|
|
|
|
GetFile;
|
|
|
|
end. |