Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 39 for isAbs (0.06 sec)

  1. src/path/filepath/path.go

    // EvalSymlinks calls [Clean] on the result.
    func EvalSymlinks(path string) (string, error) {
    	return evalSymlinks(path)
    }
    
    // IsAbs reports whether the path is absolute.
    func IsAbs(path string) bool {
    	return filepathlite.IsAbs(path)
    }
    
    // Abs returns an absolute representation of path.
    // If the path is not absolute it will be joined with the current
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 15.5K bytes
    - Viewed (0)
  2. src/syscall/fs_wasip1.go

    	var dirFd = int32(-1)
    	var dirName string
    
    	dir := "/"
    	if !isAbs(path) {
    		dir = cwd
    	}
    	path = joinPath(dir, path)
    
    	for _, p := range preopens {
    		if len(p.name) > len(dirName) && stringslite.HasPrefix(path, p.name) {
    			dirFd, dirName = p.fd, p.name
    		}
    	}
    
    	path = path[len(dirName):]
    	for isAbs(path) {
    		path = path[1:]
    	}
    	if len(path) == 0 {
    		path = "."
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 15 19:57:43 UTC 2024
    - 24.1K bytes
    - Viewed (0)
  3. src/cmd/go/internal/cache/default.go

    	// otherwise distinguish between an explicit "off" and a UserCacheDir error.
    
    	defaultDirOnce.Do(func() {
    		defaultDir = cfg.Getenv("GOCACHE")
    		if defaultDir != "" {
    			defaultDirChanged = true
    			if filepath.IsAbs(defaultDir) || defaultDir == "off" {
    				return
    			}
    			defaultDir = "off"
    			defaultDirErr = fmt.Errorf("GOCACHE is not an absolute path")
    			return
    		}
    
    		// Compute default location.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 16 14:34:32 UTC 2024
    - 3K bytes
    - Viewed (0)
  4. src/cmd/go/internal/envcmd/env.go

    		if strings.HasPrefix(val, "~") {
    			return fmt.Errorf("GOPATH entry cannot start with shell metacharacter '~': %q", val)
    		}
    		if !filepath.IsAbs(val) && val != "" {
    			return fmt.Errorf("GOPATH entry is relative; must be absolute path: %q", val)
    		}
    	case "GOMODCACHE":
    		if !filepath.IsAbs(val) && val != "" {
    			return fmt.Errorf("GOMODCACHE entry is relative; must be absolute path: %q", val)
    		}
    	case "CC", "CXX":
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 24 17:13:51 UTC 2024
    - 19.6K bytes
    - Viewed (0)
  5. src/cmd/doc/main.go

    	// First, is it a complete package path as it is? If so, we are done.
    	// This avoids confusion over package paths that have other
    	// package paths as their prefix.
    	var importErr error
    	if filepath.IsAbs(arg) {
    		pkg, importErr = build.ImportDir(arg, build.ImportComment)
    		if importErr == nil {
    			return pkg, arg, "", false
    		}
    	} else {
    		pkg, importErr = build.Import(arg, wd, build.ImportComment)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 14 19:41:17 UTC 2024
    - 12.2K bytes
    - Viewed (0)
  6. internal/event/target/mqtt.go

    	if err != nil {
    		return err
    	}
    	switch u.Scheme {
    	case "ws", "wss", "tcp", "ssl", "tls", "tcps":
    	default:
    		return errors.New("unknown protocol in broker address")
    	}
    	if m.QueueDir != "" {
    		if !filepath.IsAbs(m.QueueDir) {
    			return errors.New("queueDir path should be absolute")
    		}
    		if m.QoS == 0 {
    			return errors.New("qos should be set to 1 or 2 if queueDir is set")
    		}
    	}
    
    	return nil
    }
    
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Fri May 24 23:05:23 UTC 2024
    - 8.2K bytes
    - Viewed (0)
  7. internal/event/target/nsq.go

    		return nil
    	}
    
    	if n.NSQDAddress.IsEmpty() {
    		return errors.New("empty nsqdAddress")
    	}
    
    	if n.Topic == "" {
    		return errors.New("empty topic")
    	}
    	if n.QueueDir != "" {
    		if !filepath.IsAbs(n.QueueDir) {
    			return errors.New("queueDir path should be absolute")
    		}
    	}
    
    	return nil
    }
    
    // NSQTarget - NSQ target.
    type NSQTarget struct {
    	initOnce once.Init
    
    	id         event.TargetID
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Fri May 24 23:05:23 UTC 2024
    - 7.1K bytes
    - Viewed (0)
  8. internal/event/target/webhook.go

    // Validate WebhookArgs fields
    func (w WebhookArgs) Validate() error {
    	if !w.Enable {
    		return nil
    	}
    	if w.Endpoint.IsEmpty() {
    		return errors.New("endpoint empty")
    	}
    	if w.QueueDir != "" {
    		if !filepath.IsAbs(w.QueueDir) {
    			return errors.New("queueDir path should be absolute")
    		}
    	}
    	if w.ClientCert != "" && w.ClientKey == "" || w.ClientCert == "" && w.ClientKey != "" {
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Fri May 24 23:05:23 UTC 2024
    - 8.5K bytes
    - Viewed (0)
  9. src/go/internal/gcimporter/gcimporter.go

    		}
    		id = bp.ImportPath
    
    	case build.IsLocalImport(path):
    		// "./x" -> "/this/directory/x.ext", "/this/directory/x"
    		noext = filepath.Join(srcDir, path)
    		id = noext
    
    	case filepath.IsAbs(path):
    		// for completeness only - go/build.Import
    		// does not support absolute imports
    		// "/x" -> "/x.ext", "/x"
    		noext = path
    		id = path
    	}
    
    	if false { // for debugging
    		if path != id {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 6.4K bytes
    - Viewed (0)
  10. src/go/build/build.go

    		return f(s)
    	}
    	return filepath.SplitList(s)
    }
    
    // isAbsPath calls ctxt.IsAbsPath (if not nil) or else filepath.IsAbs.
    func (ctxt *Context) isAbsPath(path string) bool {
    	if f := ctxt.IsAbsPath; f != nil {
    		return f(path)
    	}
    	return filepath.IsAbs(path)
    }
    
    // isDir calls ctxt.IsDir (if not nil) or else uses os.Stat.
    func (ctxt *Context) isDir(path string) bool {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 16:25:21 UTC 2024
    - 62.3K bytes
    - Viewed (0)
Back to top