// CreateLink uses Create to create a symlink between oldname and newname.
CreateLink uses Create to create a symlink between oldname and newname.
// CreateLink uses Create to create a symlink between oldname and newname .
func (i *inodeOperations) CreateLink(ctx context.Context, dir *fs.Inode, oldname string, newname string) error {
	if len(newname) > maxFilenameLen {
		return syserror.ENAMETOOLONG
	}
	owner := fs.FileOwnerFromContext(ctx)
	if _, err := i.fileState.file.symlink(ctx, oldname, newname, p9.UID(owner.UID), p9.GID(owner.GID)); err != nil {
		return err
	}
	i.touchModificationAndStatusChangeTime(ctx, dir)
	return nil
}
func ( i * inodeOperations ) CreateLink ( ctx context . Context , dir * fs . Inode , oldname string , newname string ) error { if len ( newname ) > maxFilenameLen { return syserror . ENAMETOOLONG } owner := fs . FileOwnerFromContext ( ctx ) if _ , err := i . fileState . file . symlink ( ctx , oldname , newname , p9 . UID ( owner . UID ) , p9 . GID ( owner . GID ) ) ; err != nil { return err } i . touchModificationAndStatusChangeTime ( ctx , dir ) return nil }
CreateLink uses Create to create a symlink between oldname and newname.
CreateLink uses Create to create a symlink between oldname and newname .