docs(libio): Add enum file funcs section

This commit is contained in:
Gleb Zaharov 2024-11-21 20:31:17 +03:00
parent 975284f5f3
commit 27cada955e

View File

@ -0,0 +1,59 @@
# Libio
> Lib for work with files
## Functions
### Files enumeration
##### `file_find_first`
> Find first file with matching attributes and mask in specified directory.
**Prototype**:
`proc file.find_first dir, mask, attr`
**Arguments**:
| name | type | Describtion |
| :--- | :----: | :------------------------------------------------------- |
| dir | ASCIIZ | Directory path, to search in |
| mask | ASCIIZ | File mask, with use of wildcards (a.k.a. shell patterns) |
| attr | ASCIIZ | File attributes mask (combination of FA_* constants) |
**Result**:
| register | type | Description |
| :------- | :-------: | :--------------------------------------------------------------------- |
| EAX | Fileinfo* | 0 for error<br/>Matched file data pointer (__acts as find descriptor__) |
##### `file_find_next`
> Find next file matching criteria.
**Prototype**:
`proc file.find_next findd`
**Argument**:
| name | type | Describtion |
| :---- | :-------: | :--------------------------------------------------------- |
| findd | Fileinfo* | Find describtion (see [file_find_first](#file_find_first)) |
**Result**:
| register | type | Description |
| :------- | :-------: | :--------------------------------------------------------------------- |
| EAX | Fileinfo* | 0 for info<br/>Matched file data pointer (__acts as find descriptor__) |
##### `file_find_close`
> Find next file matching criteria.
**Prototype**:
`Find next file matching criteria.`
**Arguents**:
| name | type | Describtion |
| :---- | :-------: | :--------------------------------------------------------- |
| findd | Fileinfo* | Find describtion (see [file_find_first](#file_find_first)) |
**Result**:
| register | type | Description |
| :------- | :---: | :------------------------------- |
| EAX | dword | Result of memory freeing routine |