I am aware of the difference between content and contents and usually the distinction is clear to me. However I am wondering whether file content or file contents is more correct. On the one hand, the content of a file is a finite sequence of bytes, hence contents would be appropriate. On the other hand, those bytes represent some entity (an image, for example), to which I would refer as the file's content. Is this distinction correct, or am I complicating things too much?


You are correct. "Content" (without the S) implies there's some kind of meaning; not just a string of bytes. If you refer to thefreedictionary.com, the first definition that's NOT shown as synonymous with "contents" is "the substantive or meaningful part"; which in this case is the entity represented by the bytes.

| improve this answer | |

The general usage is File contents (when referring to something contained)

Google Ngram also shows that File contents has an edge over file content

Google Ngram

| improve this answer | |
  • Sir, didn't knew about google Ngram thats really awesome thing to know. Thanks! – stringparser Nov 28 '15 at 19:11

It seems more appropriate to use file contents.

For example, PHP programming language has two corresponding functions, named file_get_contents and file_put_contents.

Additionally, note that file_get_contents() accepts offset and maxlen parameters, thus tending to treat the file contents as a "sequence of bytes".

Taken from file_get_contents() documentation:

file_get_contents() returns the file in a string, starting at the specified offset up to maxlen bytes

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.