Subversion Repositories Kolibri OS

Rev

Rev 617 | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 617 Rev 987
1
;-----------------------------------------------------------------------------
1
;;================================================================================================;;
2
; Copyright (c) 2006-2007, mike.dld
2
;;//// libio.inc //// (c) mike.dld, 2007-2008 ////////////////////////////////////////////////////;;
3
;-----------------------------------------------------------------------------
3
;;================================================================================================;;
4
; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
4
;;                                                                                                ;;
5
; IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
5
;; This file is part of Common development libraries (Libs-Dev).                                  ;;
6
; FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
6
;;                                                                                                ;;
-
 
7
;; Libs-Dev is free software: you can redistribute it and/or modify it under the terms of the GNU ;;
7
; AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
8
;; General Public License as published by the Free Software Foundation, either version 3 of the   ;;
8
; LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
9
;; License, or (at your option) any later version.                                                ;;
-
 
10
;;                                                                                                ;;
9
; FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
11
;; Libs-Dev is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without  ;;
10
; DEALINGS IN THE SOFTWARE.
12
;; even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU  ;;
-
 
13
;; General Public License for more details.                                                       ;;
-
 
14
;;                                                                                                ;;
11
;-----------------------------------------------------------------------------
15
;; You should have received a copy of the GNU General Public License along with Libs-Dev. If not, ;;
-
 
16
;; see .                                                            ;;
-
 
17
;;                                                                                                ;;
-
 
18
;;================================================================================================;;
-
 
19
 
-
 
20
 
12
 
21
O_BINARY = 00000000b
13
O_READ	 = 00000001b
22
O_READ	 = 00000001b
14
O_WRITE  = 00000010b
23
O_WRITE  = 00000010b
15
O_CREATE = 00000100b
24
O_CREATE = 00000100b
16
O_SHARE  = 00001000b
25
O_SHARE  = 00001000b
-
 
26
O_TEXT	 = 00010000b
17
 
27
 
18
SEEK_SET = 0
28
SEEK_SET = 0
19
SEEK_CUR = 1
29
SEEK_CUR = 1
20
SEEK_END = 2
30
SEEK_END = 2
21
 
31
 
22
struct DateTime
32
struct FileDateTime
23
  union
33
  union
24
    time    dd ?
34
    time    dd ?
25
    struct
35
    struct
26
      sec   db ?
36
      sec   db ?
27
      min   db ?
37
      min   db ?
28
      hour  db ?
38
      hour  db ?
29
    ends
39
    ends
30
  ends
40
  ends
31
  union
41
  union
32
    date    dd ?
42
    date    dd ?
33
    struct
43
    struct
34
      day   db ?
44
      day   db ?
35
      month db ?
45
      month db ?
36
      year  dw ?
46
      year  dw ?
37
    ends
47
    ends
38
  ends
48
  ends
39
ends
49
ends
40
 
50
 
41
struct FileInfoBlock
51
struct FileInfoBlock
42
  Function   dd ?
52
  Function   dd ?
43
  Position   dd ?
53
  Position   dd ?
44
  Flags      dd ?
54
  Flags      dd ?
45
  Count      dd ?
55
  Count      dd ?
46
  Buffer     dd ?
56
  Buffer     dd ?
47
	     db ?
57
	     db ?
48
  FileName   dd ?
58
  FileName   dd ?
49
ends
59
ends
50
 
60
 
51
struct FileInfoHeader
61
struct FileInfoHeader
52
  Version    dd ?
62
  Version    dd ?
53
  FilesRead  dd ?
63
  FilesRead  dd ?
54
  FilesCount dd ?
64
  FilesCount dd ?
55
	     rd 5
65
	     rd 5
56
ends
66
ends
57
 
67
 
58
struct FileInfoA
68
struct FileInfoA
59
  Attributes   dd ?
69
  Attributes   dd ?
60
  Flags        dd ?
70
  Flags        dd ?
61
  DateCreate   DateTime
71
  DateCreate   FileDateTime
62
  DateAccess   DateTime
72
  DateAccess   FileDateTime
63
  DateModify   DateTime
73
  DateModify   FileDateTime
-
 
74
  union
64
  FileSize     dd ?
75
    FileSize   dq ?
-
 
76
    struct
-
 
77
      FileSizeLow  dd ?
65
  FileSizeHigh dd ?
78
      FileSizeHigh dd ?
-
 
79
    ends
-
 
80
  ends
66
  FileName     rb 264
81
  FileName     rb 252
67
ends
82
ends
68
 
83
 
69
struct FileInfoW
84
struct FileInfoW
70
  Attributes   dd ?
85
  Attributes   dd ?
71
  Flags        dd ?
86
  Flags        dd ?
72
  DateCreate   DateTime
87
  DateCreate   FileDateTime
73
  DateAccess   DateTime
88
  DateAccess   FileDateTime
74
  DateModify   DateTime
89
  DateModify   FileDateTime
-
 
90
  union
75
  FileSize     dd ?
91
    FileSize   dq ?
-
 
92
    struct
-
 
93
      FileSizeLow  dd ?
76
  FileSizeHigh dd ?
94
      FileSizeHigh dd ?
-
 
95
    ends
-
 
96
  ends
77
  FileName     rw 260
97
  FileName     rw 260
78
ends
98
ends
79
 
99
 
80
virtual at 0
100
virtual at 0
81
	 FileInfo	     FileInfoA
101
	 FileInfo	     FileInfoA
82
	 FileInfo fix	     FileInfoA
102
	 FileInfo fix	     FileInfoA
83
  sizeof.FileInfo fix sizeof.FileInfoA
103
  sizeof.FileInfo fix sizeof.FileInfoA
84
end virtual
104
end virtual
85
 
105
 
86
FA_READONLY = 00000001b
106
FA_READONLY = 00000001b
87
FA_HIDDEN   = 00000010b
107
FA_HIDDEN   = 00000010b
88
FA_SYSTEM   = 00000100b
108
FA_SYSTEM   = 00000100b
89
FA_LABEL    = 00001000b
109
FA_LABEL    = 00001000b
90
FA_FOLDER   = 00010000b
110
FA_FOLDER   = 00010000b
91
FA_ARCHIVED = 00100000b
111
FA_ARCHIVED = 00100000b
-
 
112
FA_ANY	    = 00111111b