diff --git a/client.go b/client.go index 3a9a8bf1..a98a7aa4 100644 --- a/client.go +++ b/client.go @@ -593,6 +593,14 @@ func (c *Client) Truncate(path string, size int64) error { return c.setstat(path, sshFileXferAttrSize, uint64(size)) } +// SetExtendedAttrs replaces the extended attributes of the named file. +func (c *Client) SetExtendedAttrs(path string, extended []StatExtended) error { + attrs := &FileStat{ + Extended: extended, + } + return c.setstat(path, sshFileXferAttrExtended, attrs) +} + // Open opens the named file for reading. If successful, methods on the // returned file can be used for reading; the associated file descriptor // has mode O_RDONLY.