Subversion Repositories Kolibri OS

Rev

Rev 7983 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 7983 Rev 8859
Line 1... Line 1...
1
(*
1
(*
2
    Copyright 2016, 2018 Anton Krotov
2
    Copyright 2016, 2018, 2021 Anton Krotov
Line 3... Line 3...
3
 
3
 
4
    This program is free software: you can redistribute it and/or modify
4
    This program is free software: you can redistribute it and/or modify
5
    it under the terms of the GNU Lesser General Public License as published by
5
    it under the terms of the GNU Lesser General Public License as published by
6
    the Free Software Foundation, either version 3 of the License, or
6
    the Free Software Foundation, either version 3 of the License, or
Line 89... Line 89...
89
 
89
 
90
    RETURN KOSAPI.sysfunc22(70, sys.ADR(fs), res2) = 0
90
    RETURN KOSAPI.sysfunc22(70, sys.ADR(fs), res2) = 0
Line -... Line 91...
-
 
91
END GetFileInfo;
-
 
92
 
-
 
93
 
-
 
94
PROCEDURE FileSize* (FName: ARRAY OF CHAR): INTEGER;
-
 
95
VAR
-
 
96
    Info: rFD;
-
 
97
    res: INTEGER;
-
 
98
BEGIN
-
 
99
    IF GetFileInfo(FName, Info) THEN
-
 
100
        res := Info.size
-
 
101
    ELSE
-
 
102
        res := -1
-
 
103
    END
-
 
104
    RETURN res
91
END GetFileInfo;
105
END FileSize;
92
 
106
 
93
 
107
 
94
PROCEDURE Exists* (FName: ARRAY OF CHAR): BOOLEAN;
108
PROCEDURE Exists* (FName: ARRAY OF CHAR): BOOLEAN;
95
VAR
109
VAR