Exemplo n.º 1
0
func (r *HTTPClient) LsDir(path string) (string, error) {
	url := r.NewURLString(path, "LISTSTATUS")
	resp, err := r.http.Get(url)
	if err != nil {
		return "", err
	}

	return httputil.ReadCloseResponseBodyAsString(resp)
}
Exemplo n.º 2
0
func (r *HTTPClient) GetHomeDir() (string, error) {
	url := r.NewURLString("/", "GETHOMEDIRECTORY")
	resp, err := r.http.Get(url)
	if err != nil {
		return "", err
	}

	return httputil.ReadCloseResponseBodyAsString(resp)
}