getsessionsdir

This commit is contained in:
sawka
2022-09-20 14:15:39 -07:00
parent df80d2ac08
commit 9702fb648a
+6
View File
@@ -157,6 +157,12 @@ func CleanUpCmdFiles(sessionId string, cmdId string) error {
return err
}
func GetSessionsDir() string {
mhome := GetMShellHomeDir()
sdir := path.Join(mhome, SessionsDirBaseName)
return sdir
}
func EnsureSessionDir(sessionId string) (string, error) {
if sessionId == "" {
return "", fmt.Errorf("Bad sessionid, cannot be empty")