Keeping track of number of bytes written sounds best.. (not sure sure what S3 does when you delete file before it actually 'appears').

Otherwise, you could set the default based on filesystem (20 for S3 and 0 for others).