aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJoe Tsai <joetsai@digital-static.net>2017-11-29 17:11:45 -0800
committerJoe Tsai <joetsai@google.com>2018-03-29 23:17:53 +0000
commitdfd7f3562645ebd587d7d883bbaa8915fcf8c84b (patch)
tree4d24688128eac091ec6b07417bc64ada6dff7ccb /test
parent4b265fb74736ffaba2ad5cc96f43e442ae0d9850 (diff)
downloadgo-dfd7f3562645ebd587d7d883bbaa8915fcf8c84b.tar.xz
os: add ModeIrregular flag
There is currently no way for os.FileMode.IsRegular to report false without being one of the following types: ModeDir | ModeSymlink | ModeNamedPipe | ModeSocket | ModeDevice This makes it difficult for custom implementations of os.FileInfo to return a Mode that is explicitly not regular without resorting to setting one of the types listed above. However, every one of the aforementioned types are ill-suited as a general-purpose "not regular" file type. Thus, add a ModeIrregular to serve exactly for that purpose. The ModeIrregular type carries no information other than the fact that the file is not regular. Updates #22903 Fixes #23878 Change-Id: I4f34d88f960bcb014816d8e7b5de8b1035077948 Reviewed-on: https://go-review.googlesource.com/94856 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Diffstat (limited to 'test')
0 files changed, 0 insertions, 0 deletions