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.

14 lines
206 B

  1. package tools
  2. import "os"
  3. func PathExists(path string) (bool, error) {
  4. _, err := os.Stat(path)
  5. if err == nil {
  6. return true, nil
  7. }
  8. if os.IsNotExist(err) {
  9. return false, nil
  10. }
  11. return false, err
  12. }