// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

/**
 * This contains a reader that accesses data from local files, so it can't
 * be run in the browser.
 */

library file_data_reader;

import 'dart:io';
import 'intl_helpers.dart';

class FileDataReader implements LocaleDataReader {

  /// The base path from which we will read data.
  String path;

  FileDataReader(this.path);

  /// Read the locale data found for [locale] on our [path].
  Future read(String locale) {
    var file = new File('$path$locale.json');
    return file.readAsText();
  }
}

// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

/**
 * This contains a reader that accesses data from local files, so it can't
 * be run in the browser.
 */

library file_data_reader;

import 'dart:io';
import 'intl_helpers.dart';

class FileDataReader implements LocaleDataReader {

  /// The base path from which we will read data.
  String path;

  FileDataReader(this.path);

  /// Read the locale data found for [locale] on our [path].
  Future read(String locale) {
    var file = new File('$path$locale.json');
    return file.readAsString();
  }
}

Rename File.readAsText to File.readAsString. There is no Text type in Dart and the methods return Strings.
Rename File.readAsText to File.readAsString. There is no Text type in Dart
and the methods return Strings.

R=sgjesse@google.com
BUG=

Review URL: https://codereview.chromium.org//11412033

git-svn-id: a8f079e7cfc3a289d8496d7b88aabbd5c45a3053@15011 260f80e4-7a28-3924-810f-c04153c831b5
