MCPcopy Create free account
hub / github.com/SolarLune/masterplan / FileExists

Function FileExists

utils.go:1025–1034  ·  view source on GitHub ↗

func DrawRectExpanded(r rl.Rectangle, thickness float32, color rl.Color) { r.X -= thickness r.Y -= thickness r.Width += thickness * 2 r.Height += thickness * 2 rl.DrawRectangleRec(r, color) } func ClosestPowerOfTwo(number float32) int32 { o := int32(2) for o < int32(number) { o *= 2 } ret

(fp string)

Source from the content-addressed store, hash-verified

1023// }
1024
1025func FileExists(fp string) bool {
1026 fp = strings.TrimSpace(fp)
1027 fsInfo, err := os.Stat(fp)
1028
1029 if (err != nil && !os.IsExist(err)) || fsInfo.IsDir() {
1030 return false
1031 }
1032
1033 return true
1034}
1035
1036func FolderExists(fp string) bool {
1037 fp = strings.TrimSpace(fp)

Callers 7

SaveMethod · 0.85
OpenProjectFromFunction · 0.85
PathToRelativeMethod · 0.85
PathToAbsoluteMethod · 0.85
HandleFontReloadFunction · 0.85
NewProgramSettingsFunction · 0.85
NewResourceFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected