core: new file and directory helpers.