An attempt was made to read or write a directory as if it were a file.
Look at a listing of all the files in the current directory and try again, specifying a file instead of a directory.
The symbolic name for this error is EISDIR, errno=21.