public static function readFromFile($file) {
        $real_file = File::asFile($file);

        if ($real_file->exists())
            return self::readFromString($file->getContent());
        else
            return array();
    }