Subversion Repositories Kolibri OS

Rev

Rev 717 | Go to most recent revision | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

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