refactor(fs): refactor file structure and add progmatic api