Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 252 for isSlash (0.15 sec)

  1. src/syscall/exec_windows.go

    		if n <= uint32(len(buf)) {
    			return UTF16ToString(buf[:n]), nil
    		}
    	}
    }
    
    func isSlash(c uint8) bool {
    	return c == '\\' || c == '/'
    }
    
    func normalizeDir(dir string) (name string, err error) {
    	ndir, err := FullPath(dir)
    	if err != nil {
    		return "", err
    	}
    	if len(ndir) > 2 && isSlash(ndir[0]) && isSlash(ndir[1]) {
    		// dir cannot have \\server\share\path form
    		return "", EINVAL
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Sep 28 18:29:48 UTC 2023
    - 10.3K bytes
    - Viewed (0)
  2. src/cmd/go/internal/fsys/fsys.go

    	if l := len(path); l >= 5 && isSlash(path[0]) && isSlash(path[1]) &&
    		!isSlash(path[2]) && path[2] != '.' {
    		// first, leading `\\` and next shouldn't be `\`. its server name.
    		for n := 3; n < l-1; n++ {
    			// second, next '\' shouldn't be repeated.
    			if isSlash(path[n]) {
    				n++
    				// third, following something characters. its share name.
    				if !isSlash(path[n]) {
    					if path[n] == '.' {
    						break
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Jun 06 18:35:34 UTC 2024
    - 22.7K bytes
    - Viewed (0)
  3. src/net/http/httputil/reverseproxy.go

    	}
    	// Same as singleJoiningSlash, but uses EscapedPath to determine
    	// whether a slash should be added
    	apath := a.EscapedPath()
    	bpath := b.EscapedPath()
    
    	aslash := strings.HasSuffix(apath, "/")
    	bslash := strings.HasPrefix(bpath, "/")
    
    	switch {
    	case aslash && bslash:
    		return a.Path + b.Path[1:], apath + bpath[1:]
    	case !aslash && !bslash:
    		return a.Path + "/" + b.Path, apath + "/" + bpath
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Feb 27 23:37:42 UTC 2024
    - 24.9K bytes
    - Viewed (0)
  4. test/fuse.go

    }
    
    func fPhi(a, b string) string {
    	aslash := strings.HasSuffix(a, "/") // ERROR "Redirect Phi based on Phi$"
    	bslash := strings.HasPrefix(b, "/")
    	switch {
    	case aslash && bslash:
    		return a + b[1:]
    	case !aslash && !bslash:
    		return a + "/" + b
    	}
    	return a + b
    }
    
    func main() {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jan 23 00:02:36 UTC 2024
    - 5.3K bytes
    - Viewed (0)
  5. staging/src/k8s.io/apimachinery/pkg/util/proxy/upgradeaware.go

    // See-also: https://github.com/golang/go/issues/44290
    func singleJoiningSlash(a, b string) string {
    	aslash := strings.HasSuffix(a, "/")
    	bslash := strings.HasPrefix(b, "/")
    	switch {
    	case aslash && bslash:
    		return a + b[1:]
    	case !aslash && !bslash:
    		return a + "/" + b
    	}
    	return a + b
    }
    
    func (h *UpgradeAwareHandler) DialForUpgrade(req *http.Request) (net.Conn, error) {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Mar 04 19:10:30 UTC 2024
    - 19.6K bytes
    - Viewed (0)
  6. src/os/exec_windows.go

    					cmd = cmd[1:]
    				}
    				inquote = !inquote
    			} else {
    				b = append(b, c)
    			}
    			nslash = 0
    			continue
    		case '\\':
    			nslash++
    			continue
    		}
    		b = appendBSBytes(b, nslash)
    		nslash = 0
    		b = append(b, c)
    	}
    	return appendBSBytes(b, nslash), ""
    }
    
    // commandLineToArgv splits a command line into individual argument
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jun 10 22:06:47 UTC 2024
    - 5K bytes
    - Viewed (0)
  7. platforms/core-execution/build-cache-packaging/src/main/java/org/gradle/caching/internal/packaging/impl/RelativePathParser.java

    import com.google.common.base.CharMatcher;
    import org.gradle.internal.file.FilePathUtil;
    
    import java.util.ArrayDeque;
    import java.util.Deque;
    
    public class RelativePathParser {
        private static final CharMatcher IS_SLASH = CharMatcher.is('/');
    
        private final Deque<String> directoryPaths = new ArrayDeque<>();
        private final Deque<String> directoryNames = new ArrayDeque<>();
        private final int rootLength;
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Fri Sep 22 09:43:12 UTC 2023
    - 3.3K bytes
    - Viewed (0)
  8. src/go/printer/comment.go

    		} else {
    			line = "// " + line
    		}
    		out = append(out, &ast.Comment{
    			Slash: slash,
    			Text:  line,
    		})
    	}
    	if len(directives) > 0 {
    		out = append(out, &ast.Comment{
    			Slash: slash,
    			Text:  "//",
    		})
    		for _, c := range directives {
    			out = append(out, &ast.Comment{
    				Slash: slash,
    				Text:  c.Text,
    			})
    		}
    	}
    	return out
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Sep 27 07:35:19 UTC 2022
    - 3.5K bytes
    - Viewed (0)
  9. platforms/jvm/testing-jvm/src/main/java/org/gradle/api/internal/tasks/testing/detection/DefaultTestClassScanner.java

            });
        }
    
        private abstract class ClassFileVisitor extends EmptyFileVisitor implements ReproducibleFileVisitor {
            @Override
            public void visitFile(FileVisitDetails fileDetails) {
                if (isClass(fileDetails) && !isAnonymousClass(fileDetails)) {
                    visitClassFile(fileDetails);
                }
            }
    
            abstract void visitClassFile(FileVisitDetails fileDetails);
    
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Mon Sep 18 20:52:40 UTC 2023
    - 4K bytes
    - Viewed (0)
  10. src/path/path.go

    // slashes are removed.
    // If the path is empty, Dir returns ".".
    // If the path consists entirely of slashes followed by non-slash bytes, Dir
    // returns a single slash. In any other case, the returned path does not end in a
    // slash.
    func Dir(path string) string {
    	dir, _ := Split(path)
    	return Clean(dir)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Nov 23 17:33:57 UTC 2023
    - 5.9K bytes
    - Viewed (0)
Back to top