# Function pages::git::read_file

source · [−]

    pub fn read_file(
        repo_path: &PathBuf,
        path: &str
    ) -> Result<FileInfo, ServiceError>

Expand description

Please note that this method expects path to not contain any spaces Use [escape_spaces] before calling this method

For example, a read request for “foo bar.md” will fail even if that file is present in the repository. However, it will succeed if the output of [escape_spaces] is used in the request.