Refactor the filesystem API in order to allow to provide its own exclusions