File API (unrefactored)