forked from keybase/kbfs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdummy.go
57 lines (42 loc) · 1.27 KB
/
dummy.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
// Copyright 2016 Keybase Inc. All rights reserved.
// Use of this source code is governed by a BSD
// license that can be found in the LICENSE file.
// +build !windows
package dokan
import "C"
import (
"errors"
"github.com/keybase/kbfs/dokan/winacl"
)
var errNotWindows = errors.New("dokan not supported outside Windows")
func loadDokanDLL(fullpath string) error { return errNotWindows }
// FileInfo contains information about files, this is a dummy definition.
type FileInfo struct {
ptr *struct {
DeleteOnClose int
DokanOptions struct {
GlobalContext uint64
}
}
rawPath struct{}
}
func (*FileInfo) isRequestorUserSidEqualTo(sid *winacl.SID) bool { return false }
type dokanCtx struct{}
func allocCtx(slot uint32) *dokanCtx { return nil }
func (*dokanCtx) Run(path string, flags MountFlag) error { return errNotWindows }
func (*dokanCtx) Free() {}
func lpcwstrToString(struct{}) string { return "" }
func unmount(path string) error {
return errNotWindows
}
const (
kbfsLibdokanDebug = MountFlag(0)
kbfsLibdokanStderr
kbfsLibdokanRemovable
kbfsLibdokanMountManager
kbfsLibdokanCurrentSession
kbfsLibdokanUseFindFilesWithPattern
)
func currentProcessUserSid() (*winacl.SID, error) {
return nil, errNotWindows
}