Subversion Repositories Kolibri OS

Rev

Go to most recent revision | Blame | Last modification | View Log | Download | RSS feed

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