lnrpc: reuse common FileExists function

This commit is contained in:
Joost Jager
2019-01-11 10:50:12 +01:00
parent 70c874be88
commit 8996a1490d
3 changed files with 2 additions and 32 deletions

View File

@@ -60,16 +60,6 @@ type Server struct {
// AutopilotServer gRPC service.
var _ AutopilotServer = (*Server)(nil)
// fileExists reports whether the named file or directory exists.
func fileExists(name string) bool {
if _, err := os.Stat(name); err != nil {
if os.IsNotExist(err) {
return false
}
}
return true
}
// New returns a new instance of the autopilotrpc Autopilot sub-server. We also
// return the set of permissions for the macaroons that we may create within
// this method. If the macaroons we need aren't found in the filepath, then