- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 10 for nb (0.13 sec)
-
src/archive/tar/reader.go
// special headers that contain no data section. func (tr *Reader) handleRegularFile(hdr *Header) error { nb := hdr.Size if isHeaderOnlyType(hdr.Typeflag) { nb = 0 } if nb < 0 { return ErrHeader } tr.pad = blockPadding(nb) tr.curr = ®FileReader{r: tr.r, nb: nb} return nil } // handleSparseFile checks if the current file is a sparse format of any type
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Fri Mar 08 01:59:14 GMT 2024 - 26.8K bytes - Viewed (0) -
src/archive/tar/writer.go
type regFileWriter struct { w io.Writer // Underlying Writer nb int64 // Number of remaining bytes to write } func (fw *regFileWriter) Write(b []byte) (n int, err error) { overwrite := int64(len(b)) > fw.nb if overwrite { b = b[:fw.nb] } if len(b) > 0 { n, err = fw.w.Write(b) fw.nb -= int64(n) } switch { case err != nil: return n, err case overwrite:
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Fri Oct 13 18:36:46 GMT 2023 - 19.6K bytes - Viewed (0) -
internal/lock/lock_nix.go
// it is similar to LockedOpenFile with with syscall.LOCK_EX // mode but along with syscall.LOCK_NB such that the function // doesn't wait forever but instead returns if it cannot // acquire a write lock. func TryLockedOpenFile(path string, flag int, perm os.FileMode) (*LockedFile, error) { return lockedOpenFile(path, flag, perm, syscall.LOCK_NB) } // LockedOpenFile - initializes a new lock and protects
Go - Registered: Sun Apr 21 19:28:08 GMT 2024 - Last Modified: Thu Aug 19 01:35:22 GMT 2021 - 2.8K bytes - Viewed (0) -
internal/lock/lock_solaris.go
} } return &LockedFile{f}, nil } // TryLockedOpenFile - tries a new write lock, functionality // it is similar to LockedOpenFile with with syscall.LOCK_EX // mode but along with syscall.LOCK_NB such that the function // doesn't wait forever but instead returns if it cannot // acquire a write lock. func TryLockedOpenFile(path string, flag int, perm os.FileMode) (*LockedFile, error) {
Go - Registered: Sun Apr 21 19:28:08 GMT 2024 - Last Modified: Sun Jan 02 17:15:06 GMT 2022 - 2.8K bytes - Viewed (0) -
src/bufio/bufio_test.go
s += s1 } return s } // Call Read to accumulate the text of a file func reads(buf *Reader, m int) string { var b [1000]byte nb := 0 for { n, err := buf.Read(b[nb : nb+m]) nb += n if err == io.EOF { break } } return string(b[0:nb]) } type bufReader struct { name string fn func(*Reader) string } var bufreaders = []bufReader{
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Fri Feb 10 18:56:01 GMT 2023 - 51.5K bytes - Viewed (0) -
internal/lock/lock_windows.go
} } return &LockedFile{File: f}, nil } // TryLockedOpenFile - tries a new write lock, functionality // it is similar to LockedOpenFile with with syscall.LOCK_EX // mode but along with syscall.LOCK_NB such that the function // doesn't wait forever but instead returns if it cannot // acquire a write lock. func TryLockedOpenFile(path string, flag int, perm os.FileMode) (*LockedFile, error) {
Go - Registered: Sun Apr 21 19:28:08 GMT 2024 - Last Modified: Wed Oct 18 18:08:15 GMT 2023 - 7.9K bytes - Viewed (0) -
cmd/admin-handlers-pools.go
ctx := r.Context() objectAPI, _ := validateAdminReq(ctx, w, r, policy.RebalanceAdminAction) if objectAPI == nil { return } // NB rebalance-start admin API is always coordinated from first pool's // first node. The following is required to serialize (the effects of) // concurrent rebalance-start commands.
Go - Registered: Sun Apr 28 19:28:10 GMT 2024 - Last Modified: Thu Apr 04 12:04:40 GMT 2024 - 10.9K bytes - Viewed (0) -
internal/bucket/lifecycle/lifecycle.go
func (lc Lifecycle) eval(obj ObjectOpts, now time.Time) Event { var events []Event if obj.ModTime.IsZero() { return Event{} } // Handle expiry of restored object; NB Restored Objects have expiry set on // them as part of RestoreObject API. They aren't governed by lifecycle // rules. if !obj.RestoreExpires.IsZero() && now.After(obj.RestoreExpires) { action := DeleteRestoredAction
Go - Registered: Sun Apr 28 19:28:10 GMT 2024 - Last Modified: Sat Mar 09 06:41:22 GMT 2024 - 17K bytes - Viewed (0) -
cmd/erasure-metadata-utils.go
dataDir = ddir } } if max >= writeQuorum { return dataDir } return "" } // Returns number of errors that occurred the most (incl. nil) and the // corresponding error value. NB When there is more than one error value that // occurs maximum number of times, the error value returned depends on how // golang's map orders keys. This doesn't affect correctness as long as quorum
Go - Registered: Sun Apr 28 19:28:10 GMT 2024 - Last Modified: Tue Apr 23 17:15:52 GMT 2024 - 11.3K bytes - Viewed (0) -
src/bytes/bytes.go
chunkMax = chunkLimit / len(b) * len(b) if chunkMax == 0 { chunkMax = len(b) } } nb := bytealg.MakeNoZero(n)[:n:n] bp := copy(nb, b) for bp < n { chunk := bp if chunk > chunkMax { chunk = chunkMax } bp += copy(nb[bp:], nb[:chunk]) } return nb } // ToUpper returns a copy of the byte slice s with all Unicode letters mapped to // their upper case.
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Mon Feb 19 19:51:15 GMT 2024 - 33.8K bytes - Viewed (0)