hmFS.close(fileId)
Close file
Type
(fileId: number) => result
Parameters
fileId
| Description | Type |
|---|---|
| File handle, returned when the file is opened | number |
result
| Description | Type |
|---|---|
result, 0 get success | number |
Code example
const fileId = hmFS.open("test_file.txt", hmFS.O_RDWR | hmFS.O_CREAT)
//Close file
hmFS.close(fileId)