filesystem: reduce boilerplate