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?
3 Answers
The general usage is File contents (when referring to something contained)
Google Ngram also shows that File contents has an edge over file content

- 1,488
-
1Sir, didn't knew about google Ngram thats really awesome thing to know. Thanks! – stringparser Nov 28 '15 at 19:11
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.
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
- 151
- 1
- 1
- 7
-
It's not because a language uses it that it automatically makes it more appropriate. Maybe the dictionary should now spell "referer" with only 3 R's with that kind of logic. – Alexis Wilke Aug 21 '21 at 21:30