• Joe Tsai's avatar
    os: add ModeIrregular flag · dfd7f356
    Joe Tsai authored
    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/94856Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
    dfd7f356
Name
Last commit
Last update
.github Loading commit data...
api Loading commit data...
doc Loading commit data...
lib/time Loading commit data...
misc Loading commit data...
src Loading commit data...
test Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
AUTHORS Loading commit data...
CONTRIBUTING.md Loading commit data...
CONTRIBUTORS Loading commit data...
LICENSE Loading commit data...
PATENTS Loading commit data...
README.md Loading commit data...
favicon.ico Loading commit data...
robots.txt Loading commit data...