fsdef.go 945 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. package fsdef
  2. /*
  3. fsdef.go
  4. This package handle error related to file systems.
  5. See comments below for usage.
  6. */
  7. import "errors"
  8. var (
  9. /*
  10. READ WRITE PERMISSIONS
  11. */
  12. FsReadOnly = "readonly"
  13. FsWriteOnly = "writeonly"
  14. FsReadWrite = "readwrite"
  15. FsDenied = "denied"
  16. /*
  17. ERROR TYPES
  18. */
  19. //Redirective Error
  20. ErrRedirectParent = errors.New("Redirect:parent")
  21. ErrRedirectCurrentRoot = errors.New("Redirect:root")
  22. ErrRedirectUserRoot = errors.New("Redirect:userroot")
  23. //Resolve errors
  24. ErrVpathResolveFailed = errors.New("FS_VPATH_RESOLVE_FAILED")
  25. ErrRpathResolveFailed = errors.New("FS_RPATH_RESOLVE_FAILED")
  26. ErrFSHNotFOund = errors.New("FS_FILESYSTEM_HANDLER_NOT_FOUND")
  27. //Operation errors
  28. ErrOperationNotSupported = errors.New("FS_OPR_NOT_SUPPORTED")
  29. ErrNullOperation = errors.New("FS_NULL_OPR")
  30. )
  31. func NewRedirectionError(targetVpath string) error {
  32. return errors.New("Redirect:" + targetVpath)
  33. }