Slight cleanup after rebase

This commit is contained in:
DaneEveritt
2022-10-16 13:34:24 -07:00
parent 37c52dd439
commit a74ea6a9ff
6 changed files with 96 additions and 30 deletions

View File

@@ -6,6 +6,7 @@ import (
"os"
"os/exec"
"path"
"path/filepath"
"strings"
"emperror.dev/errors"
@@ -57,6 +58,12 @@ type Disk struct {
commander CommanderProvider
}
// DiskPath returns the underlying path that contains the virtual disk for the server
// identified by its UUID.
func DiskPath(uuid string) string {
return filepath.Join(config.Get().System.Data, ".vhd/", uuid+".img")
}
// New returns a new Disk instance. The "size" parameter should be provided in
// bytes of space allowed for the disk. An additional slice of option callbacks
// can be provided to programatically swap out the underlying filesystem