The English Oracle

"file content" vs. "file contents"

--------------------------------------------------
Rise to the top 3% as a developer or hire one of them at Toptal: https://topt.al/25cXVn
--------------------------------------------------

Music by Eric Matyas
https://www.soundimage.org
Track title: The Builders

--

Chapters
00:00 &Quot;File Content&Quot; Vs. &Quot;File Contents&Quot;
00:35 Answer 1 Score 12
00:50 Accepted Answer Score 12
01:14 Answer 3 Score 3
01:51 Thank you

--

Full question
https://english.stackexchange.com/questi...

--

Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...

--

Tags
#meaning

#avk47



ANSWER 1

Score 12


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




ACCEPTED ANSWER

Score 12


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.




ANSWER 3

Score 3


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