Return the file content as a string.
326137
def get(self):
        """"""
        r = self._session.get(self.content, headers={'Accept': '*/*'})
        return r.content
1031946
def get_file_contents(path):
    
    with open(path, 'rb') as fp:
        # mitogen.core.Blob() is a bytes subclass with a repr() that returns a
        # summary of the blob, rather than the raw blob data. This makes
        # logging output *much* nicer. Unlike most custom types, blobs can be
        # serialized.
        return mitogen.core.Blob(fp.read())
263486
def get_file_contents(path, binary=False):
    
    # if this isn't a text file, we should raise an IOError
    f = open(path, 'r')
    file_contents = f.read()
    f.close()
    if not binary and file_contents.find('\000') >= 0:
        raise IOError('Expected text file, got binary file')
    return file_contents
183068
def toStr(self) :
		""""""
		s = [self.strLegend]
		for l in self.lines :
			s.append(l.toStr())
		return self.lineSeparator.join(s)
221149
def from_string(cls, id, format, raw_content, compressed=False,
                    encoded=False):
        """"""
        content = cls(id, format, compressed, encoded)
        content._raw_content = raw_content
        return content
655031
def file_get_contents(self, path):
        

        with open(self.get_full_file_path(path), 'r') as f: return  f.read()
167688
def load_version_as_string():
    """"""
    with open(VERSION_PATH, 'r') as rfile:
        contents = rfile.read().strip()

    _, version = contents.split('=')
    version = version.strip()

    # Remove quotes
    return version.strip('"\'')
633379
def content(self):
        """"""

        if not self.payload:
            return ''

        if self.payload.is_multipart():
            message_bytes = mime_to_bytes(
                self.payload, 0).replace(b'\n', b'\r\n')
            boundary = b'--' + self.payload.get_boundary().encode('utf-8')
            temp = message_bytes.split(boundary)
            temp.pop(0)
            return boundary + boundary.join(temp)
        else:
            content = self.payload.get_payload()
            if isinstance(content, str_cls):
                content = content.encode('utf-8')
            return content
492922
def _text_file(self, url):
        """"""
        try:
            with open(url, 'r', encoding='utf-8') as file:
                return file.read()
        except FileNotFoundError:
            print('File `{}` not found'.format(url))
            sys.exit(0)
1266963
public static String readFileContentToString(String filePath)
            throws IOException {
        String content = "";
        content = Files.toString(new File(filePath), Charsets.UTF_8);
        return content;
    }
60348
def getFileDescription(self, fileInfo):
		""""""
		data = 'Description'
		result = fileInfo[fileInfo.find(data + "</td>") + len(data + "</td>"):]
		result.lstrip()
		result = result[:result.find("</td>")]
		result = result[result.rfind("<"):]
		if "<td" in result:
			result = result[result.find(">") + 1:]
		return result
494168
def to_string(self, format_, fps=None, **kwargs):
        
        fp = io.StringIO()
        self.to_file(fp, format_, fps=fps, **kwargs)
        return fp.getvalue()
186660
def read_file(file_path, mode = 'rt'):
    
    contents = ''
    with open(file_path, mode) as f:
        contents = f.read()
    return contents
694600
def files(self):
        """"""
        contents = self.paths
        contents = (VenvFile(path.path) for path in contents if path.is_file)
        return contents
637933
def read_content (self):
        """"""
        if self.is_directory():
            data = get_index_html(get_files(self.get_os_filename()))
            if isinstance(data, unicode):
                data = data.encode("iso8859-1", "ignore")
        else:
            data = super(FileUrl, self).read_content()
        return data
1129173
def get_content(self, r):
        """"""
        if self.type == 'exp_file':
            # don't use the decoded r.text
            return r.content
        elif self.type == 'version':
            return r.content
        else:
            if self.fmt == 'json':
                content = {}
                # Decode
                try:
                    # Watch out for bad/empty json
                    content = json.loads(r.text, strict=False)
                except ValueError as e:
                    if not self.expect_empty_json():
                        # reraise for requests that shouldn't send empty json
                        raise ValueError(e)
                finally:
                    return content
            else:
                return r.text
576328
def dumps(self):
        """"""

        ret_str = [Command('path', options=self.options).dumps()]

        ret_str.append(self.path.dumps())

        return ' '.join(ret_str) + ';'