MCPcopy Create free account
hub / github.com/rabbitstack/fibratus / QueryDosDevice

Function QueryDosDevice

pkg/sys/fs.go:85–92  ·  view source on GitHub ↗

QueryDosDevice translates the DOS device name to hard disk drive letter.

(drive string)

Source from the content-addressed store, hash-verified

83
84// QueryDosDevice translates the DOS device name to hard disk drive letter.
85func QueryDosDevice(drive string) (string, error) {
86 dev := make([]uint16, windows.MAX_PATH)
87 _, err := windows.QueryDosDevice(windows.StringToUTF16Ptr(drive), &dev[0], windows.MAX_PATH)
88 if err != nil {
89 return "", err
90 }
91 return windows.UTF16ToString(dev), nil
92}
93
94// PathIsDirectory determines if the provided path is a directory.
95func PathIsDirectory(path string) bool {

Callers 1

NewDevMapperFunction · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected