common api: file, return zero file size for directory.