File IO.
More...
Go to the source code of this file.
File IO.
- Todo:
- remove FILE as pointer
Definition in file file.h.
◆ create()
| int create |
( |
const int |
filename, |
|
|
size_t |
size |
|
) |
| |
Create file.
- Parameters
-
| filename | |
| size | in sectors(512B) >=0 |
- Returns
- int new file's id or -error
Definition at line 77 of file file.h.
◆ open()
| FILE* open |
( |
int |
filename, |
|
|
int |
mode |
|
) |
| |
◆ read()
| int read |
( |
int |
buf, |
|
|
size_t |
size, |
|
|
FILE * |
stream |
|
) |
| |
Read from file.
- Parameters
-
| buf | pointer to target memory |
| size | to read in bytes |
| stream | FILE |
- Returns
- int actually readed Bytes or -error
Definition at line 53 of file file.h.
◆ remove()
| int remove |
( |
const int |
filename | ) |
|
Remove file.
- Parameters
-
- Returns
- int 0 if success or -error
Definition at line 87 of file file.h.
◆ write()
| int write |
( |
int |
buf, |
|
|
size_t |
size, |
|
|
FILE * |
stream |
|
) |
| |
Write to file.
- Parameters
-
| buf | pointer to source memory |
| size | to write in Bytes, file will be rounded to whole sectors |
| stream | FILE |
- Returns
- int actually written Bytes or -error
Definition at line 66 of file file.h.