Reads file at path and returns dict with separated frontmatter.
        See read() for more info on dict return value.
544466
def read_file(cls, path):
        
        with open(path, encoding="utf-8") as file:
            file_contents = file.read()
            return cls.read(file_contents)
763031
def from_file(cls, path):

        

        with open(path, 'r', errors='replace') as f:
            return cls(f.read())
434540
def read(file_path):
    
    # Read in file
    actual_file_path = os.path.expanduser(file_path)
    with open(actual_file_path, 'r') as f:
        lines = f.readlines()
    
    # Create GMT object
    gmt = []
    
    # Iterate over each line
    for line_num, line in enumerate(lines):
        # Separate along tabs
        fields = line.split('\t')

        assert len(fields) > 2, (
            "Each line must have at least 3 tab-delimited items. " +
            "line_num: {}, fields: {}").format(line_num, fields)
        
        # Get rid of trailing whitespace
        fields[-1] = fields[-1].rstrip()
        
        # Collect entries
        entries = fields[2:]
        
        # Remove empty entries
        entries = [x for x in entries if x]

        assert len(set(entries)) == len(entries), (
            "There should not be duplicate entries for the same set. " +
            "line_num: {}, entries: {}").format(line_num, entries)

        # Store this line as a dictionary
        line_dict = {SET_IDENTIFIER_FIELD: fields[0],
                     SET_DESC_FIELD: fields[1],
                     SET_MEMBERS_FIELD: entries}
        gmt.append(line_dict)

    verify_gmt_integrity(gmt)

    return gmt
510631
def read_file(cls, filepath):
        
        with open(filepath, mode='rb') as f:
            contents = f.read()
        return cls.decode(contents)
1276889
def read(self, path, environ):
        
        try:
            inp = open(path, 'rb')
        except FileNotFoundError as error:
            if error.errno != 2:
                raise
            return None
        parsing = parse_vexrc(inp, environ)
        for heading, key, value in parsing:
            heading = self.default_heading if heading is None else heading
            if heading not in self.headings:
                self.headings[heading] = OrderedDict()
            self.headings[heading][key] = value
        parsing.close()
461433
def read(fname):
    "  "
    if exists(fname):
        return open(join(dirname(__file__), fname)).read()
79647
function readFile(path) {
  try {
    var contents = _fs2.default.readFileSync(path, { encoding: 'utf8' });

    return contents;
  } catch (error) {
    throw new Error(error);
  }
}
448337
def _read(path):
    
    input = open(path, "r", encoding="utf-8")
    try:
        return input.read()
    finally:
        input.close()
188835
def _read_file(path):
    '''
    
    '''
    try:
        with salt.utils.files.fopen(path, 'rb') as contents:
            return salt.utils.yaml.safe_load(contents)
    except (OSError, IOError):
        return {}
1346313
def read(*paths):
    """"""
    p = os.path.join(*paths)
    if os.path.exists(p):
        with open(p, 'r') as f:
            return f.read()
    return ''
1151445
def read_file(self, file_path):
        
        try:
            with open(self.p(file_path)) as fd:
                return fd.read()
        except IOError as ex:
            logger.error("error while accessing file %s: %r", file_path, ex)
            raise ConuException("There was an error while accessing file %s: %r", file_path, ex)
209241
def read_file(filename):
    
    hits = glob.glob('**/{}'.format(filename), recursive=True)
    if not len(hits):
        pf.debug('No file "{}" found.'.format(filename))
        return ''
    elif len(hits) > 1:
        pf.debug('File pattern "{}" ambiguous. Using first.'.format(filename))

    with open(hits[0], 'r') as f:
        return f.read()
1931
def read(in_path):
    
    assert os.path.exists(in_path), "The following GRP file can't be found. in_path: {}".format(in_path)

    with open(in_path, "r") as f:
        lines = f.readlines()
        # need the second conditional to ignore comment lines
        grp = [line.strip() for line in lines if line and not re.match("^#", line)]

    return grp
13719
protected Spec readSpecFromFile(Path path) throws IOException {
    Spec spec;

    try (FSDataInputStream fis = fs.open(path)) {
      spec = this.specSerDe.deserialize(ByteStreams.toByteArray(fis));
    }

    return spec;
  }
474977
def read(self, path, filename=None, offset=None, size=-1):
        
        storageScheme, key = self.getkey(path, filename=filename)

        if offset or (size > -1):
            if not offset:
                offset = 0
            if size > -1:
                sizeStr = offset + size - 1  # range header is inclusive
            else:
                sizeStr = ""
            headers = {"Range": "bytes=%d-%s" % (offset, sizeStr)}
            return key.get_contents_as_string(headers=headers)
        else:
            return key.get_contents_as_string()
942957
def read(path, root_path=None):
    """"""
    try:
        root_path = root_path or get_root_path()
        real_path = os.path.realpath(os.path.join(root_path, path))
        with open(real_path) as fp:
            return fp.read().strip()
    except IOError:
        return ""
587523
def read_json_file(cls, path):
        
        with open(path, 'r') as f:
            json_string = f.read()
        return cls.from_json(json_string)