From eb2ad8039c77b6dc5d64a3cba5654ebc54cb170c Mon Sep 17 00:00:00 2001 From: Sweetbread Date: Thu, 21 Nov 2024 20:31:17 +0300 Subject: [PATCH] docs(libio): Add enum file funcs section --- .../libraries/libs-dev/libio/README.md | 59 +++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 programs/develop/libraries/libs-dev/libio/README.md diff --git a/programs/develop/libraries/libs-dev/libio/README.md b/programs/develop/libraries/libs-dev/libio/README.md new file mode 100644 index 0000000000..d28340b871 --- /dev/null +++ b/programs/develop/libraries/libs-dev/libio/README.md @@ -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 info
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
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 |