b36870fe768d76c1376d3ea14d90de644a90aecb
[fifth.git] / doc / commands / dsk&file.txt
1                         Disk & file access\r
2                         ------------------\r
3 \r
4 diskload ( FromDisk ToMem amount -- )\r
5                 Load specified abount of bytes from disk into memory.\r
6 \r
7 disksave ( FromMem ToDisk amount -- )\r
8                 save specified abount of bytes from memory into disk.\r
9 \r
10 format ( -- )   Erase all files.\r
11 \r
12 fsDfilesize@ ( handle -- size )\r
13                 Return size of opened file.\r
14 \r
15 fsDcurloc@ ( handle -- location )\r
16                 Return current location in file.\r
17 \r
18 fsDupdated@ ( handle -- updated? )\r
19                 Return true if file was updated,\r
20                 ie. write operations occured.\r
21 \r
22 fssave ( FromMem DestFileHandle amount -- )\r
23                 Save data to file.\r
24 \r
25 fsload ( SrcFileHandle ToMem amount -- )\r
26                 Load data from file.\r
27 \r
28 fseof ( handle -- bytesLeft )\r
29                 Return amount of bytes left till end of file.\r
30                 Useful before read operation.\r
31 \r
32 fsls ( -- )     List all files and lists (directories,folders)\r
33                 in current path.\r
34 \r
35 fslsr ( -- )    Same as "fsls" but recursively scans also sub lists.\r
36 \r
37 fscl ( DynStrHand -- )\r
38                 Change list (path)\r
39 \r
40 fscreate ( DynStrHand -- DescPnt )\r
41                 Create new file or list. Can create multiple lists at once.\r
42                 ex: when creating:\r
43                     "\listGAMES\listSTRATEGY\listSIMWORLD\5th-runme"\r
44                 and only "\listGAMES\" already exist, then\r
45                 "listSTRATEGY" and "listSIMWORLD" lists will be created,\r
46                 and empty file "5th-runme" placed in there.\r
47 \r
48 fsDsave ( DynHand<data> DynStrHand<filename> -- )\r
49                 Create new file and save all data from dynamic memory\r
50                 block to it.\r
51 \r
52 fsDload ( DynStr<SrcFileName> DynHand<DataDest> -- )\r
53                 Load whole file into dynamic memory block.\r
54 \r
55 fsDloadnew ( DynStr<SrcFileName> -- DynHand<DataDest> )\r
56                 Load whole file into new dynamic memory block.\r
57 \r