diff --git a/lib/KolibriOS/File.ob07 b/lib/KolibriOS/File.ob07 index d25a8d6..dc99a0c 100644 --- a/lib/KolibriOS/File.ob07 +++ b/lib/KolibriOS/File.ob07 @@ -1,5 +1,5 @@ (* - Copyright 2016, 2018 Anton Krotov + Copyright 2016, 2018, 2021 Anton Krotov This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by @@ -91,6 +91,20 @@ BEGIN END GetFileInfo; +PROCEDURE FileSize* (FName: ARRAY OF CHAR): INTEGER; +VAR + Info: rFD; + res: INTEGER; +BEGIN + IF GetFileInfo(FName, Info) THEN + res := Info.size + ELSE + res := -1 + END + RETURN res +END FileSize; + + PROCEDURE Exists* (FName: ARRAY OF CHAR): BOOLEAN; VAR fd: rFD; diff --git a/lib/KolibriOS/OpenDlg.ob07 b/lib/KolibriOS/OpenDlg.ob07 index 82d6bfb..819d34d 100644 --- a/lib/KolibriOS/OpenDlg.ob07 +++ b/lib/KolibriOS/OpenDlg.ob07 @@ -1,5 +1,5 @@ (* - Copyright 2016, 2018, 2020 Anton Krotov + Copyright 2016, 2018, 2020, 2021 Anton Krotov This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by @@ -19,12 +19,17 @@ MODULE OpenDlg; IMPORT sys := SYSTEM, KOSAPI; +CONST + topen* = 0; + tsave* = 1; + tdir* = 2; + TYPE DRAW_WINDOW = PROCEDURE; TDialog = RECORD - _type, + _type*, procinfo, com_area_name, com_area,