translated FileSystemModel to scala