How to detect a new, empty, document at startup?

Submitted by: Karl Johan Kleist Last Updated: 2006-09-01

How to detect a new, empty, document at startup?

if (file_size(doc_path(doc)) == -1)