You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

18 lines
273 B

3 years ago
  1. //go:build !linux && !windows
  2. // +build !linux,!windows
  3. package unmount
  4. import (
  5. "os"
  6. "syscall"
  7. )
  8. func unmount(dir string) error {
  9. err := syscall.Unmount(dir, 0)
  10. if err != nil {
  11. err = &os.PathError{Op: "unmount", Path: dir, Err: err}
  12. return err
  13. }
  14. return nil
  15. }