File system

File system close

// PROTOTYPE
int close(int fd)

Closes a file descriptor.

  • fd: The file descriptor for the file, return from the open call.

Returns 0 on success. On error, returns -1 and sets errno.