Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for cleanPath (0.14 sec)

  1. pkg/kubelet/cm/util/cgroups_linux.go

    // getCgroupV1Path gets the file path to the "devices" subsystem of the desired cgroup.
    // cgroupPath is the path in the cgroup hierarchy.
    func getCgroupV1Path(cgroupPath string) (string, error) {
    	cgroupPath = libcontainerutils.CleanPath(cgroupPath)
    
    	mnt, root, err := libcontainercgroups.FindCgroupMountpointAndRoot(cgroupPath, "devices")
    	// If we didn't mount the subsystem, there is no point we make the path.
    	if err != nil {
    		return "", err
    	}
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Mar 12 07:50:19 UTC 2020
    - 2.9K bytes
    - Viewed (0)
  2. src/net/http/server_test.go

    		in, want string
    	}{
    		{"//", "/"},
    		{"/x", "/x"},
    		{"//x", "/x"},
    		{"x//", "/x/"},
    		{"a//b/////c", "/a/b/c"},
    		{"/foo/../bar/./..//baz", "/baz"},
    	} {
    		got := cleanPath(test.in)
    		if got != test.want {
    			t.Errorf("%s: got %q, want %q", test.in, got, test.want)
    		}
    	}
    }
    
    func BenchmarkServerMatch(b *testing.B) {
    	fn := func(w ResponseWriter, r *Request) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Feb 13 13:54:22 UTC 2024
    - 7.3K bytes
    - Viewed (0)
  3. pkg/volume/util/volumepathhandler/volume_path_handler_linux.go

    		if backingFilePath == path || backingFilePath == realPath {
    			return fmt.Sprintf("/dev/%s", filepath.Base(device)), nil
    		}
    	}
    
    	return "", errors.New(ErrDeviceNotFound)
    }
    
    // cleanPath remove any trailing substrings that are not part of the backing file path.
    func cleanBackingFilePath(path string) string {
    	// If the block device was deleted, the path will contain a "(deleted)" suffix
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jun 20 14:49:03 UTC 2023
    - 7.6K bytes
    - Viewed (0)
  4. src/net/http/servemux121.go

    		}
    
    		return mux.handler(r.Host, r.URL.Path)
    	}
    
    	// All other requests have any port stripped and path cleaned
    	// before passing to mux.handler.
    	host := stripHostPort(r.Host)
    	path := cleanPath(r.URL.Path)
    
    	// If the given path is /tree and its handler is not registered,
    	// redirect for /tree/.
    	if u, ok := mux.redirectToPathSlash(host, path, r.URL); ok {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Apr 18 15:40:38 UTC 2024
    - 5.8K bytes
    - Viewed (0)
Back to top