示例#1
0
                    // Even though plan9 doesn't support the Lock/RLock/Unlock functions to
                    // manipulate already-open files, IsLocked is still meaningful: os.OpenFile
                    // itself may return errors that indicate that a file with the ModeExclusive bit
                    // set is already open.
                    private static bool isLocked(error err)
                    {
                        var s = err.Error();

                        foreach (var(_, frag) in lockedErrStrings)
                        {
                            if (strings.Contains(s, frag))
                            {
                                return(true);
                            }
                        }
                        return(false);
                    }
示例#2
0
文件: PathError.cs 项目: ynse01/dotgo
 public string Error()
 {
     return(err.Error());
 }
示例#3
0
 private static ptr <PtyError> ptyError(@string name, error err)
 {
     return(addr(new PtyError(name, err.Error(), err.(syscall.Errno))));
 }