mirror of https://github.com/pkg/sftp.git
Export RealPath for potential client use
This commit is contained in:
parent
f50ad19e9f
commit
b83052b538
|
@ -789,7 +789,7 @@ func (c *Client) PosixRename(oldname, newname string) error {
|
|||
}
|
||||
}
|
||||
|
||||
func (c *Client) realpath(path string) (string, error) {
|
||||
func (c *Client) RealPath(path string) (string, error) {
|
||||
id := c.nextID()
|
||||
typ, data, err := c.sendPacket(nil, &sshFxpRealpathPacket{
|
||||
ID: id,
|
||||
|
@ -820,7 +820,7 @@ func (c *Client) realpath(path string) (string, error) {
|
|||
// Getwd returns the current working directory of the server. Operations
|
||||
// involving relative paths will be based at this location.
|
||||
func (c *Client) Getwd() (string, error) {
|
||||
return c.realpath(".")
|
||||
return c.RealPath(".")
|
||||
}
|
||||
|
||||
// Mkdir creates the specified directory. An error will be returned if a file or
|
||||
|
|
Loading…
Reference in New Issue