package sysfs
import (
"io/fs"
"os"
"path"
experimentalsys "github.com/tetratelabs/wazero/experimental/sys"
)
func (d *dirFS ) Link (oldName , newName string ) experimentalsys .Errno {
err := os .Link (d .join (oldName ), d .join (newName ))
return experimentalsys .UnwrapOSError (err )
}
func (d *dirFS ) Unlink (path string ) (err experimentalsys .Errno ) {
return unlink (d .join (path ))
}
func (d *dirFS ) Rename (from , to string ) experimentalsys .Errno {
from , to = d .join (from ), d .join (to )
return rename (from , to )
}
func (d *dirFS ) Chmod (path string , perm fs .FileMode ) experimentalsys .Errno {
err := os .Chmod (d .join (path ), perm )
return experimentalsys .UnwrapOSError (err )
}
func (d *dirFS ) Symlink (oldName , link string ) experimentalsys .Errno {
if path .IsAbs (oldName ) {
return experimentalsys .EPERM
}
err := os .Symlink (oldName , d .join (link ))
return experimentalsys .UnwrapOSError (err )
}
The pages are generated with Golds v0.8.2 . (GOOS=linux GOARCH=amd64)
Golds is a Go 101 project developed by Tapir Liu .
PR and bug reports are welcome and can be submitted to the issue list .
Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds .