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