vendor/github.com/fsnotify/fsnotify/fsnotify_unsupported.go
changeset 260 445e01aede7e
parent 242 2a9ec03fe5a1
equal deleted inserted replaced
259:db4911b0c721 260:445e01aede7e
       
     1 // Copyright 2022 The Go Authors. All rights reserved.
       
     2 // Use of this source code is governed by a BSD-style
       
     3 // license that can be found in the LICENSE file.
       
     4 
       
     5 //go:build !darwin && !dragonfly && !freebsd && !openbsd && !linux && !netbsd && !solaris && !windows
       
     6 // +build !darwin,!dragonfly,!freebsd,!openbsd,!linux,!netbsd,!solaris,!windows
       
     7 
       
     8 package fsnotify
       
     9 
       
    10 import (
       
    11 	"fmt"
       
    12 	"runtime"
       
    13 )
       
    14 
       
    15 // Watcher watches a set of files, delivering events to a channel.
       
    16 type Watcher struct{}
       
    17 
       
    18 // NewWatcher establishes a new watcher with the underlying OS and begins waiting for events.
       
    19 func NewWatcher() (*Watcher, error) {
       
    20 	return nil, fmt.Errorf("fsnotify not supported on %s", runtime.GOOS)
       
    21 }
       
    22 
       
    23 // Close removes all watches and closes the events channel.
       
    24 func (w *Watcher) Close() error {
       
    25 	return nil
       
    26 }
       
    27 
       
    28 // Add starts watching the named file or directory (non-recursively).
       
    29 func (w *Watcher) Add(name string) error {
       
    30 	return nil
       
    31 }
       
    32 
       
    33 // Remove stops watching the the named file or directory (non-recursively).
       
    34 func (w *Watcher) Remove(name string) error {
       
    35 	return nil
       
    36 }