From 6eae262ecac69de8f82ef7da2f8baf25123e8601 Mon Sep 17 00:00:00 2001 From: AntKrotov Date: Tue, 6 Apr 2021 18:45:47 +0300 Subject: [PATCH] =?UTF-8?q?KolibriOS:=20=D0=BE=D0=B1=D0=BD=D0=BE=D0=B2?= =?UTF-8?q?=D0=BB=D0=B5=D0=BD=D0=B8=D0=B5=20=D0=B1=D0=B8=D0=B1=D0=BB=D0=B8?= =?UTF-8?q?=D0=BE=D1=82=D0=B5=D0=BA=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/KolibriOS/File.ob07 | 16 +++++++++++++++- lib/KolibriOS/OpenDlg.ob07 | 9 +++++++-- 2 files changed, 22 insertions(+), 3 deletions(-) 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,