github.com/sberex/go-sberex@v1.8.2-0.20181113200658-ed96ac38f7d7/swarm/fuse/swarmfs_fallback.go (about)

     1  // This file is part of the go-sberex library. The go-sberex library is 
     2  // free software: you can redistribute it and/or modify it under the terms 
     3  // of the GNU Lesser General Public License as published by the Free 
     4  // Software Foundation, either version 3 of the License, or (at your option)
     5  // any later version.
     6  //
     7  // The go-sberex library is distributed in the hope that it will be useful, 
     8  // but WITHOUT ANY WARRANTY; without even the implied warranty of
     9  // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser 
    10  // General Public License <http://www.gnu.org/licenses/> for more details.
    11  
    12  // +build !linux,!darwin,!freebsd
    13  
    14  package fuse
    15  
    16  import (
    17  	"errors"
    18  )
    19  
    20  var errNoFUSE = errors.New("FUSE is not supported on this platform")
    21  
    22  func isFUSEUnsupportedError(err error) bool {
    23  	return err == errNoFUSE
    24  }
    25  
    26  type MountInfo struct {
    27  	MountPoint     string
    28  	StartManifest  string
    29  	LatestManifest string
    30  }
    31  
    32  func (self *SwarmFS) Mount(mhash, mountpoint string) (*MountInfo, error) {
    33  	return nil, errNoFUSE
    34  }
    35  
    36  func (self *SwarmFS) Unmount(mountpoint string) (bool, error) {
    37  	return false, errNoFUSE
    38  }
    39  
    40  func (self *SwarmFS) Listmounts() ([]*MountInfo, error) {
    41  	return nil, errNoFUSE
    42  }
    43  
    44  func (self *SwarmFS) Stop() error {
    45  	return nil
    46  }