Closes the file to which filep points and frees the data structures and buffers associated with it.
#include <ts/ts.h>
If the file was opened for writing, any pending data is flushed.