PathExists wraps around os.Stat providing a nice interface for checking an existence of a path.
(path string)
| 741 | |
| 742 | // PathExists wraps around os.Stat providing a nice interface for checking an existence of a path. |
| 743 | func PathExists(path string) bool { |
| 744 | if _, err := os.Stat(path); !errors.Is(err, os.ErrNotExist) { |
| 745 | return true |
| 746 | } |
| 747 | |
| 748 | return false |
| 749 | } |
| 750 | |
| 751 | // IsContainerNameValid checks if the name of a container matches the right pattern |
| 752 | func IsContainerNameValid(containerName string) bool { |
searching dependent graphs…