gitlab.com/SkynetLabs/skyd@v1.6.9/skymodules/renter/no_fuse_support_fusemanager.go (about)

     1  //go:build !linux && !darwin
     2  // +build !linux,!darwin
     3  
     4  package renter
     5  
     6  import (
     7  	"gitlab.com/NebulousLabs/errors"
     8  
     9  	"gitlab.com/SkynetLabs/skyd/skymodules"
    10  )
    11  
    12  var errNoFuseSupportOnSystem = errors.New("Fuse library is incompatible with this operating system.")
    13  
    14  // dummyFuseManager implements the renterFuseManager interface.
    15  type dummyFuseManager struct {
    16  }
    17  
    18  // Mount always returns an error since mounting a FUSE filesystem is not
    19  // possible.
    20  func (dm dummyFuseManager) Mount(mountPoint string, sp skymodules.SiaPath, opts skymodules.MountOptions) (err error) {
    21  	return errNoFuseSupportOnSystem
    22  }
    23  
    24  // MountInfo returns the list of currently mounted fuse filesystems which is
    25  // always empty on systems without FUSE support.
    26  func (dm dummyFuseManager) MountInfo() []skymodules.MountInfo { return nil }
    27  
    28  // Unmount always returns an error since mounting is not possible.
    29  func (dm dummyFuseManager) Unmount(mountPoint string) error { return errNoFuseSupportOnSystem }
    30  
    31  // newFuseManager return a dummyFuseManager.
    32  func newFuseManager(r *Renter) renterFuseManager {
    33  	return dummyFuseManager{}
    34  }