// 파일크기 반환. 파일이 없으면 -1
function GetFileSize(FilePath: String): Int64;
var SR: TSearchRec;
begin
if FindFirst(FilePath, faAnyFile, SR)=0 then
Result:=Int64(SR.FindData.nFileSizeHigh) shl Int64(32)+Int64(SR.FindData.nFileSizeLow)
else
Result:=-1;
FindClose(SR);
end;
function GetFileSize(FilePath: String): Int64;
var SR: TSearchRec;
begin
if FindFirst(FilePath, faAnyFile, SR)=0 then
Result:=Int64(SR.FindData.nFileSizeHigh) shl Int64(32)+Int64(SR.FindData.nFileSizeLow)
else
Result:=-1;
FindClose(SR);
end;
'Delphi' 카테고리의 다른 글
[Delphi] 보이지 않는 콘솔 프로젝트 (invisible console) (0) | 2010.05.06 |
---|---|
[Delphi] 로컬-서버 유닉스 타임 (UnixTime) 비교 (0) | 2010.05.06 |
[Delphi] 핫키 등록하고 내가 쓰기 (0) | 2010.05.04 |
[Delphi] ContextMenu, FindWindow (0) | 2010.04.29 |
[Delphi] CreateProcess 완료 시점 (WaitForInputIdle) (0) | 2010.04.28 |