FileSystem: refactoring + tests (BC break)