Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for hasSuffixByte (0.1 sec)

  1. cmd/object-api-utils.go

    			return s + SlashSeparator
    		}
    		return s
    	}
    	if trailingSlash {
    		dst.WriteByte(SlashSeparatorChar)
    	}
    	return dst.String()
    }
    
    // hasSuffixByte returns true if the last byte of s is 'suffix'
    func hasSuffixByte(s string, suffix byte) bool {
    	return len(s) > 0 && s[len(s)-1] == suffix
    }
    
    // pathNeedsClean returns whether path.Clean may change the path.
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Thu Aug 08 15:29:58 UTC 2024
    - 37.1K bytes
    - Viewed (0)
  2. cmd/metacache-walk.go

    				continue
    			}
    			if len(forward) > 0 && entry < forward {
    				// Do not retain the file, since its
    				// lexially smaller than 'forward'
    				entries[i] = ""
    				continue
    			}
    			if hasSuffixByte(entry, SlashSeparatorChar) {
    				if strings.HasSuffix(entry, globalDirSuffixWithSlash) {
    					// Add without extension so it is sorted correctly.
    					entry = strings.TrimSuffix(entry, globalDirSuffixWithSlash) + slashSeparator
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Sat Jun 01 05:17:37 UTC 2024
    - 12.4K bytes
    - Viewed (0)
  3. cmd/object-api-utils_test.go

    	"github.com/minio/minio/internal/crypto"
    	"github.com/minio/pkg/v3/trie"
    )
    
    func pathJoinOld(elem ...string) string {
    	trailingSlash := ""
    	if len(elem) > 0 {
    		if hasSuffixByte(elem[len(elem)-1], SlashSeparatorChar) {
    			trailingSlash = SlashSeparator
    		}
    	}
    	return path.Join(elem...) + trailingSlash
    }
    
    func concatNaive(ss ...string) string {
    	rs := ss[0]
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Thu Aug 08 15:29:58 UTC 2024
    - 24.1K bytes
    - Viewed (0)
Back to top