Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
21
Task/File-size/Delphi/file-size.delphi
Normal file
21
Task/File-size/Delphi/file-size.delphi
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
program SizeOfFile;
|
||||
|
||||
{$APPTYPE CONSOLE}
|
||||
|
||||
uses SysUtils;
|
||||
|
||||
function CheckFileSize(const aFilename: string): Integer;
|
||||
var
|
||||
lFile: file of Byte;
|
||||
begin
|
||||
AssignFile(lFile, aFilename);
|
||||
FileMode := 0; {Access file in read only mode}
|
||||
Reset(lFile);
|
||||
Result := FileSize(lFile);
|
||||
CloseFile(lFile);
|
||||
end;
|
||||
|
||||
begin
|
||||
Writeln('input.txt ', CheckFileSize('input.txt'));
|
||||
Writeln('\input.txt ', CheckFileSize('\input.txt'));
|
||||
end.
|
||||
Loading…
Add table
Add a link
Reference in a new issue