@@ -3,16 +3,16 @@ Version=7.0
[Compiler]
A=8
B=0
-C=1
-D=1
+C=0
+D=0
E=0
F=0
G=1
H=1
-I=1
+I=0
J=0
K=0
-L=1
+L=0
M=0
N=1
O=0
@@ -25,7 +25,7 @@ U=0
V=1
W=0
X=1
-Y=1
+Y=0
Z=1
ShowHints=1
ShowWarnings=1
@@ -115,7 +115,7 @@ AutoIncBuild=1
MajorVer=2
MinorVer=0
Release=1
-Build=131
+Build=133
Debug=0
PreRelease=0
Special=0
@@ -126,7 +126,7 @@ CodePage=1252
[Version Info Keys]
CompanyName=Open Source (Jean-Francois Goulet - Creator)
FileDescription=LuaEdit Dll for System Operations
-FileVersion=2.0.1.131
+FileVersion=2.0.1.133
InternalName=LuaEditSys
LegalCopyright=LuaEdit Copyright 2004 - 2005 ©
LegalTrademarks=
@@ -18,7 +18,7 @@ uses
{$R *.res}
exports GetFileLastTimeModified, GetFileReadOnlyAttr, ToggleFileReadOnlyAttr, GetFileVersion, GetOSInfo,
- SetPrivilege, WinExit;
+ SetPrivilege, WinExit, GetFileSizeStr;
begin
end.
@@ -5,6 +5,7 @@ unit LuaEditSysUtils;
interface
+function GetFileSizeStr(Size: Cardinal): PChar;
function GetFileLastTimeModified(const sFileName: PChar): TDateTime;
function GetFileReadOnlyAttr(const sFileName: PChar): Boolean;
procedure ToggleFileReadOnlyAttr(const sFileName: PChar);
@@ -17,6 +18,17 @@ implementation
uses SysUtils, Windows;
+begin
+ if Size < 1024 then
+ Result := PChar(IntToStr(Size) + ' Bytes')
+ else
+ if Size < 1024 * 1024 then
+ Result := PChar(IntToStr(Size div (1024)) + 'KB')
+ Result := PChar(IntToStr(Size div (1024 * 1024)) + 'MB');
+end;
+
var
fHandle: THandle;