.close Method
Function: |
Closes the file opened "on" a currently selected file number (selection is made through fd.filenum). |
Syntax: |
fd.close() as pl_fd_status_codes |
Returns: |
One of the following pl_fd_status_codes, also affects fd.laststatus: 0 — PL_FD_STATUS_OK: Completed successfully. 1 — PL_FD_STATUS_FAIL: Physical flash memory failure (fatal). |
See Also: |
Details
Invoking this method also does the job performed by the fd.flush method (and this is why the 1 — PL_FD_STATUS_FAIL status code may be returned here).
Attempting to invoke this method "on" a file number that did not have any opened file associated with it generates no error.