func (f file) Truncate(ctx context.Context, size int64) error {
	newSessionID, err := f.fs.c.sendSession(ctx, f.sessionID, nil, &truncate.Request{Handle: f.handle, Size: size})
	if err != nil {
		return err
	}
	f.sessionID = newSessionID
	return nil
}
// Truncate changes the size of the named file.
Truncate changes the size of the named file.
// Truncate changes the size of the named file .
func (f file) Truncate(ctx context.Context, size int64) error {
	newSessionID, err := f.fs.c.sendSession(ctx, f.sessionID, nil, &truncate.Request{Handle: f.handle, Size: size})
	if err != nil {
		return err
	}
	f.sessionID = newSessionID
	return nil
}
func ( f file ) Truncate ( ctx context . Context , size int64 ) error { newSessionID , err := f . fs . c . sendSession ( ctx , f . sessionID , nil , & truncate . Request { Handle : f . handle , Size : size } ) if err != nil { return err } f . sessionID = newSessionID return nil }
Truncate changes the size of the named file.
Truncate changes the size of the named file .