summaryrefslogtreecommitdiffstats
path: root/Godeps/_workspace/src/gopkg.in/fsnotify.v1/fsnotify.go
diff options
context:
space:
mode:
authorChristopher Speller <crspeller@gmail.com>2016-05-12 15:08:58 -0400
committerChristopher Speller <crspeller@gmail.com>2016-05-12 16:37:29 -0400
commit84d2482ddbff9564c9ad75b2d30af66e3ddfd44d (patch)
tree8bfa567d2b6381f4a996ada2deff8a16aa85a3ac /Godeps/_workspace/src/gopkg.in/fsnotify.v1/fsnotify.go
parentd1efb66ad7b017f0fbfe6f0c20843b30f396e504 (diff)
downloadchat-84d2482ddbff9564c9ad75b2d30af66e3ddfd44d.tar.gz
chat-84d2482ddbff9564c9ad75b2d30af66e3ddfd44d.tar.bz2
chat-84d2482ddbff9564c9ad75b2d30af66e3ddfd44d.zip
Updating go depencancies. Switching to go1.6 vendoring (#2949)
Diffstat (limited to 'Godeps/_workspace/src/gopkg.in/fsnotify.v1/fsnotify.go')
-rw-r--r--Godeps/_workspace/src/gopkg.in/fsnotify.v1/fsnotify.go62
1 files changed, 0 insertions, 62 deletions
diff --git a/Godeps/_workspace/src/gopkg.in/fsnotify.v1/fsnotify.go b/Godeps/_workspace/src/gopkg.in/fsnotify.v1/fsnotify.go
deleted file mode 100644
index c899ee008..000000000
--- a/Godeps/_workspace/src/gopkg.in/fsnotify.v1/fsnotify.go
+++ /dev/null
@@ -1,62 +0,0 @@
-// Copyright 2012 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build !plan9,!solaris
-
-// Package fsnotify provides a platform-independent interface for file system notifications.
-package fsnotify
-
-import (
- "bytes"
- "fmt"
-)
-
-// Event represents a single file system notification.
-type Event struct {
- Name string // Relative path to the file or directory.
- Op Op // File operation that triggered the event.
-}
-
-// Op describes a set of file operations.
-type Op uint32
-
-// These are the generalized file operations that can trigger a notification.
-const (
- Create Op = 1 << iota
- Write
- Remove
- Rename
- Chmod
-)
-
-// String returns a string representation of the event in the form
-// "file: REMOVE|WRITE|..."
-func (e Event) String() string {
- // Use a buffer for efficient string concatenation
- var buffer bytes.Buffer
-
- if e.Op&Create == Create {
- buffer.WriteString("|CREATE")
- }
- if e.Op&Remove == Remove {
- buffer.WriteString("|REMOVE")
- }
- if e.Op&Write == Write {
- buffer.WriteString("|WRITE")
- }
- if e.Op&Rename == Rename {
- buffer.WriteString("|RENAME")
- }
- if e.Op&Chmod == Chmod {
- buffer.WriteString("|CHMOD")
- }
-
- // If buffer remains empty, return no event names
- if buffer.Len() == 0 {
- return fmt.Sprintf("%q: ", e.Name)
- }
-
- // Return a list of event names, with leading pipe character stripped
- return fmt.Sprintf("%q: %s", e.Name, buffer.String()[1:])
-}