port of FileApi 2.0 to Dartlang