Subversion Repositories Kolibri OS

Rev

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

  1. <html>
  2.        
  3. <head>
  4. <title>Sys. function 70</title>
  5. <text><b>KolibriOS Help</b></text>
  6. <text><a href="\help\soft_dev\sys_funct_main.html">[Back to list system function]</a></text>
  7. <text><a href="\help\sys_funct\f69_main.html">  [Previous page]</a></text>
  8. <text>  [Next page]</text>
  9. </br>
  10. <head>
  11.        
  12. <body>
  13. <h2>System function 70 - Work with file system with long names support</h2>
  14. <text>Parameters:</br>
  15.   Register eax = 70</br>
  16.   Register ebx = pointer to the information structure</br>
  17. Returned value:</br>
  18.   Register eax = 0 - success; otherwise file system error code some subfunctions return value in other registers too.</br>
  19. General format of the information structure:</br>
  20.   +0: dword: subfunction number</br>
  21.   +4: dword: offset in file or folder</br>
  22.   +8: dword: higher part of offset or flags</br>
  23.   +12 = +0xC: dword: size of data</br>
  24.   +16 = +0x10: dword: pointer to data</br>
  25.   +20 = +0x14: ?: path - zero terminated string</br>
  26.   or</br>
  27.   +20 = +0x14: byte: 0</br>
  28.   +21 = +0x15: dword: pointer to string</br>
  29. Case sensitivity depends on filesystem.</br>
  30. If a path not begins with '/', it is considered a relative.</br>
  31. To get or set the current folder, use the sysfunction 30.</br>
  32. '../' in the path means a lift by one folder relatively current folder.</br>
  33. To set the encoding, put at the start of the string a byte with next values:</br>
  34.   1 = cp866</br>
  35.   2 = UTF-16LE</br>
  36.   3 = UTF-8</br>
  37.   otherwise will be used cp866. In an absolute path you may put this byte after the '/' or put an additional '/' before it.</br>
  38.   Also, you may use the sysfunction 80.</br>
  39. Format of an absolute path: /base/number/dir1/dir2/.../dirn/file, where base/number identifies device, on which file is located:</br>
  40.   RD/1 = ramdisk</br>
  41.   FD/1 = first floppy drive, FD/2 = second floppy drive</br>
  42.   HD0/x, HD1/x, HD2/x, HD3/x = hard drives accordingly on IDE0 (Primary Master), IDE1 (Primary Slave), IDE2 (Secondary Master), IDE3 (Secondary Slave); x - partition number on the selected hard drive, starts from 1</br>
  43.   CD0/1, CD1/1, CD2/1, CD3/1 = same for cd</br>
  44.   SYS = system folder (encoding inaffected key), second key may be set by sysfunction 30.3.</br>
  45. Examples:</br>
  46.   '/sys/example.asm',0</br>
  47.   '/rd/1/example.asm',0</br>
  48.   '/HD0/1/folder/file.txt',0</br>
  49.   '/hd2/2/pics/tanzania.bmp',0</br>
  50.   2,'/',0,'sys','/',0,'F',0,'I',0,'L',0,'E',0,0,0</br></br>
  51.  
  52. Available subfunctions:</br>
  53.   subfunction 0 - read file</br>
  54.   subfunction 1 - read folder</br>
  55.   subfunction 2 - create/rewrite file</br>
  56.   subfunction 3 - write to existing file</br>
  57.   subfunction 4 - set file size</br>
  58.   subfunction 5 - get attributes of file/folder</br>
  59.   subfunction 6 - set attributes of file/folder</br>
  60.   subfunction 7 - start application</br>
  61.   subfunction 8 - delete file/folder</br>
  62.   subfunction 9 - create folder</br>
  63. For CD-drives due to hardware limitations only subfunctions 0,1,5 and 7 are available, other subfunctions return error with code 2.</br>
  64. At the first call of subfunctions 0,1,5,7 to ATAPI devices(CD and DVD) the manual control of tray is locked due to caching drive data. Unlocking is made when subfunction 4 of function 24 is called for corresponding device.</br>
  65. </br>
  66.   Value for register eax - 70 (SF_FILE).</br>
  67.   Values for register ebx:</br>
  68.   0 - SSF_READ_FILE - subfunction 0 - read file with long names support.</br>
  69.   1 - SSF_READ_FOLDER - subfunction 1 - read folder with long names support.</br>
  70.   2 - SSF_CREATE_FILE - subfunction 2 - create/rewrite file with long names support.</br>
  71.   3 - SSF_WRITE_FILE - subfunction 3 - write to existing file with long names support.</br>
  72.   4 - SSF_SET_END - subfunction 4 - set end of file.</br>
  73.   5 - SSF_GET_INFO - subfunction 5 - get information on file/folder.</br>
  74.   6 - SSF_SET_INFO - subfunction 6 - set attributes of file/folder.</br>
  75.   7 - SSF_START_APP - subfunction 7 - start application.</br>
  76.   8 - SSF_DELETE - subfunction 8 - delete file/folder.</br>
  77.   9 - SSF_CREATE_FOLDER - subfunction 9 - create folder.</br>
  78. </text>
  79. </body>
  80.  
  81. </html>