//go:build !tinygo

package sysfs

import (
	
	
	

	experimentalsys 
)

// Link implements the same method as documented on sys.FS
func ( *dirFS) (,  string) experimentalsys.Errno {
	 := os.Link(.join(), .join())
	return experimentalsys.UnwrapOSError()
}

// Unlink implements the same method as documented on sys.FS
func ( *dirFS) ( string) ( experimentalsys.Errno) {
	return unlink(.join())
}

// Rename implements the same method as documented on sys.FS
func ( *dirFS) (,  string) experimentalsys.Errno {
	,  = .join(), .join()
	return rename(, )
}

// Chmod implements the same method as documented on sys.FS
func ( *dirFS) ( string,  fs.FileMode) experimentalsys.Errno {
	 := os.Chmod(.join(), )
	return experimentalsys.UnwrapOSError()
}

// Symlink implements the same method as documented on sys.FS
func ( *dirFS) (,  string) experimentalsys.Errno {
	// Creating a symlink with an absolute path string fails with a "not permitted" error.
	// https://github.com/WebAssembly/wasi-filesystem/blob/v0.2.0/path-resolution.md#symlinks
	if path.IsAbs() {
		return experimentalsys.EPERM
	}
	// Note: do not resolve `oldName` relative to this dirFS. The link result is always resolved
	// when dereference the `link` on its usage (e.g. readlink, read, etc).
	// https://github.com/bytecodealliance/cap-std/blob/v1.0.4/cap-std/src/fs/dir.rs#L404-L409
	 := os.Symlink(, .join())
	return experimentalsys.UnwrapOSError()
}