compute the stamp of a file