maybe npos should be made private to core::file ?