Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 6,968 for copyFn (0.13 sec)

  1. pkg/file/file_test.go

    	"path/filepath"
    	"testing"
    
    	"istio.io/istio/pkg/test/util/assert"
    )
    
    func copyTest(t *testing.T, copyFn func(srcFilepath, targetDir, targetFilename string) error) {
    	t.Helper()
    	d := t.TempDir()
    	if err := os.WriteFile(filepath.Join(d, "in"), []byte("hello world"), 0o750); err != nil {
    		t.Fatal(err)
    	}
    	if err := copyFn(filepath.Join(d, "in"), d, "out"); err != nil {
    		t.Fatal(err)
    	}
    	f, err := os.Open(filepath.Join(d, "out"))
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Mon Dec 11 19:10:54 UTC 2023
    - 1.9K bytes
    - Viewed (0)
  2. src/runtime/mprof.go

    	return threadCreateProfileInternal(len(p), func(r profilerecord.StackRecord) {
    		copy(p[0].Stack0[:], r.Stack)
    		p = p[1:]
    	})
    }
    
    // threadCreateProfileInternal returns the number of records n in the profile.
    // If there are less than size records, copyFn is invoked for each record, and
    // ok returns true.
    func threadCreateProfileInternal(size int, copyFn func(profilerecord.StackRecord)) (n int, ok bool) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 17:57:37 UTC 2024
    - 53.3K bytes
    - Viewed (0)
  3. test/noinit.go

    	// make this special case work.
    
    	copy_four, copy_five = four, five
    	copy_x               = x
    	// copy_y = y // static init of copied strings defeats link -X; see #34675
    	copy_nilslice = nilslice
    	copy_nilmap   = nilmap
    	copy_nilfunc  = nilfunc
    	copy_nilchan  = nilchan
    	copy_nilptr   = nilptr
    )
    
    var copy_a = a
    var copy_s = s
    var copy_c = c
    
    var copy_aa = aa
    var copy_as = as
    
    var copy_sa = sa
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Apr 14 17:57:36 UTC 2023
    - 6.8K bytes
    - Viewed (0)
  4. src/cmd/compile/internal/test/testdata/gen/copyGen.go

    package main
    
    import (
    	"bytes"
    	"fmt"
    	"go/format"
    	"log"
    	"os"
    )
    
    // This program generates tests to verify that copying operations
    // copy the data they are supposed to and clobber no adjacent values.
    
    // run as `go run copyGen.go`.  A file called copy.go
    // will be written into the parent directory containing the tests.
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Sep 20 02:13:02 UTC 2022
    - 3.6K bytes
    - Viewed (0)
  5. licenses/github.com/alecthomas/participle/v2/COPYING

    Copyright (C) 2017-2022 Alec Thomas
    
    Permission is hereby granted, free of charge, to any person obtaining a copy of
    this software and associated documentation files (the "Software"), to deal in
    the Software without restriction, including without limitation the rights to
    use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
    of the Software, and to permit persons to whom the Software is furnished to do
    so, subject to the following conditions:
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Mon Apr 08 17:05:56 UTC 2024
    - 1K bytes
    - Viewed (0)
  6. cmd/kubeadm/app/util/copy.go

    		// In this case, the file is moved by copying and then deleting the source file,
    		// although it is less efficient than os.Rename().
    		klog.V(4).Infof("cannot rename %v to %v due to %v, attempting an alternative method", src, dest, err)
    		if err := CopyFile(src, dest); err != nil {
    			return errors.Wrapf(err, "failed to copy file %v to %v", src, dest)
    		}
    		return os.Remove(src)
    	}
    	return err
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Feb 22 01:42:57 UTC 2024
    - 1.9K bytes
    - Viewed (0)
  7. src/io/io_test.go

    	n, err = CopyN(b, strings.NewReader("foo"), 3) // b has read from
    	if n != 3 || err != nil {
    		t.Errorf("CopyN(bytes.Buffer, foo, 3) = %d, %v; want 3, nil", n, err)
    	}
    
    	n, err = CopyN(b, strings.NewReader("foo"), 4) // b has read from
    	if n != 3 || err != EOF {
    		t.Errorf("CopyN(bytes.Buffer, foo, 4) = %d, %v; want 3, EOF", n, err)
    	}
    
    	n, err = CopyN(b, wantedAndErrReader{}, 5)
    	if n != 5 || err != nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Oct 09 22:04:41 UTC 2023
    - 18.9K bytes
    - Viewed (0)
  8. guava/src/com/google/common/collect/SparseImmutableTable.java

        // Casts without copying.
        ImmutableMap<C, ImmutableMap<R, V>> columnMap = this.columnMap;
        return ImmutableMap.<C, Map<R, V>>copyOf(columnMap);
      }
    
      @Override
      public ImmutableMap<R, Map<C, V>> rowMap() {
        // Casts without copying.
        ImmutableMap<R, ImmutableMap<C, V>> rowMap = this.rowMap;
        return ImmutableMap.<R, Map<C, V>>copyOf(rowMap);
      }
    
      @Override
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Thu Nov 30 21:54:06 UTC 2023
    - 5.6K bytes
    - Viewed (0)
  9. subprojects/core/src/main/java/org/gradle/api/tasks/Copy.java

     */
    
    package org.gradle.api.tasks;
    
    import org.gradle.api.InvalidUserDataException;
    import org.gradle.api.internal.file.copy.CopyAction;
    import org.gradle.api.internal.file.copy.CopySpecInternal;
    import org.gradle.api.internal.file.copy.DestinationRootCopySpec;
    import org.gradle.api.internal.file.copy.FileCopyAction;
    import org.gradle.work.DisableCachingByDefault;
    
    import java.io.File;
    
    /**
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Mon Oct 24 23:13:41 UTC 2022
    - 3.4K bytes
    - Viewed (0)
  10. test/codegen/copy.go

    	// ppc64x:-".*memmove"
    	copy(x[1:], x[:])
    }
    
    func movesmall7() {
    	x := [...]byte{1, 2, 3, 4, 5, 6, 7}
    	// 386:-".*memmove"
    	// amd64:-".*memmove"
    	// arm64:-".*memmove"
    	// ppc64x:-".*memmove"
    	copy(x[1:], x[:])
    }
    
    func movesmall16() {
    	x := [...]byte{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}
    	// amd64:-".*memmove"
    	// ppc64x:".*memmove"
    	copy(x[1:], x[:])
    }
    
    var x [256]byte
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Sep 22 14:09:29 UTC 2023
    - 3.1K bytes
    - Viewed (0)
Back to top