Category "file-io"

Why does fread always return 0?

I used this code to read file. But fread function always return 0. What is my mistake? FILE *file = fopen(pathToSourceFile, "rb"); if(file!=NULL) { char a

Delphi notification when a file gets updated

My app contains documents in its database. The users can open the documents in which case, the document gets saved to a temporary folder and gets opened on the

Passing in a file name / directory into command line in Java

I'm trying to do some processing on whether the user enters a (1) file name, or (2) directory name into the command line. Anything else should throw an error.