Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 81 for chtimes (0.52 sec)

  1. src/os/file_posix.go

    // If there is an error, it will be of type [*PathError].
    func Chtimes(name string, atime time.Time, mtime time.Time) error {
    	var utimes [2]syscall.Timespec
    	set := func(i int, t time.Time) {
    		if t.IsZero() {
    			utimes[i] = syscall.Timespec{Sec: _UTIME_OMIT, Nsec: _UTIME_OMIT}
    		} else {
    			utimes[i] = syscall.NsecToTimespec(t.UnixNano())
    		}
    	}
    	set(0, atime)
    	set(1, mtime)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Feb 26 21:33:12 UTC 2024
    - 7.1K bytes
    - Viewed (0)
  2. src/os/file_plan9.go

    	}
    	return nil
    }
    
    // Chtimes changes the access and modification times of the named
    // file, similar to the Unix utime() or utimes() functions.
    // A zero time.Time value will leave the corresponding file time unchanged.
    //
    // The underlying filesystem may truncate or round the values to a
    // less precise time unit.
    // If there is an error, it will be of type *PathError.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 30 15:35:30 UTC 2024
    - 16K bytes
    - Viewed (0)
  3. src/cmd/go/testdata/script/test_cache_inputs.txt

    # changes to the external inputs to the test.
    
    [short] skip
    [GODEBUG:gocacheverify=1] skip
    
    # We're testing cache behavior, so start with a clean GOCACHE.
    env GOCACHE=$WORK/cache
    
    # Build a helper binary to invoke os.Chtimes.
    go build -o mkold$GOEXE mkold.go
    
    # Make test input files appear to be a minute old.
    exec ./mkold$GOEXE 1m testcache/file.txt
    exec ./mkold$GOEXE 1m testcache/script.sh
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sat Mar 09 22:23:53 UTC 2024
    - 6.3K bytes
    - Viewed (0)
  4. src/cmd/go/internal/cache/cache.go

    // nearly all of the mtime updates that would otherwise happen,
    // while still keeping the mtimes useful for cache trimming.
    func (c *DiskCache) used(file string) {
    	info, err := os.Stat(file)
    	if err == nil && c.now().Sub(info.ModTime()) < mtimeInterval {
    		return
    	}
    	os.Chtimes(file, c.now(), c.now())
    }
    
    func (c *DiskCache) Close() error { return c.Trim() }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sat Mar 09 14:19:39 UTC 2024
    - 20.3K bytes
    - Viewed (0)
  5. src/os/os_test.go

    func TestChtimesToUnixZero(t *testing.T) {
    	file := newFile("chtimes-to-unix-zero", t)
    	fn := file.Name()
    	defer Remove(fn)
    	if _, err := file.Write([]byte("hi")); err != nil {
    		t.Fatal(err)
    	}
    	if err := file.Close(); err != nil {
    		t.Fatal(err)
    	}
    
    	unixZero := time.Unix(0, 0)
    	if err := Chtimes(fn, unixZero, unixZero); err != nil {
    		t.Fatalf("Chtimes failed: %v", err)
    	}
    
    	st, err := Stat(fn)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 83.1K bytes
    - Viewed (0)
  6. src/cmd/link/internal/ld/lib.go

    // incorporate object file times into the final output file's build
    // ID. See issue 64947 for the unpleasant details.
    func cleanTimeStamps(files []string) {
    	epocht := time.Unix(0, 0)
    	for _, f := range files {
    		if err := os.Chtimes(f, epocht, epocht); err != nil {
    			Exitf("cannot chtimes %s: %v", f, err)
    		}
    	}
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 21 18:45:27 UTC 2024
    - 88.6K bytes
    - Viewed (0)
  7. src/cmd/go/internal/work/exec.go

    		// We want to hide that awful detail as much as possible, so don't
    		// advertise it by touching the mtimes (usually the libraries are up
    		// to date).
    		if !a.buggyInstall && !b.IsCmdList {
    			if cfg.BuildN {
    				sh.ShowCmd("", "touch %s", a.Target)
    			} else if err := AllowInstall(a); err == nil {
    				now := time.Now()
    				os.Chtimes(a.Target, now, now)
    			}
    		}
    		return nil
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jun 10 14:46:37 UTC 2024
    - 105.6K bytes
    - Viewed (0)
  8. src/cmd/vendor/github.com/google/pprof/internal/driver/config.go

    		}
    		f := configField{
    			name:     name,
    			urlparam: urlparam[name],
    			saved:    (name == js[0]),
    			field:    field,
    			choices:  choices[name],
    		}
    		f.defaultValue = def.get(f)
    		configFields = append(configFields, f)
    		configFieldMap[f.name] = f
    		for _, choice := range f.choices {
    			configFieldMap[choice] = f
    		}
    	}
    }
    
    // fieldPtr returns a pointer to the field identified by f in *cfg.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Feb 16 15:19:53 UTC 2024
    - 10.5K bytes
    - Viewed (0)
  9. src/cmd/vendor/golang.org/x/sys/unix/ztypes_linux_mips64.go

    	Jitcnt    int64
    	Calcnt    int64
    	Errcnt    int64
    	Stbcnt    int64
    	Tai       int32
    	_         [44]byte
    }
    
    type Time_t int64
    
    type Tms struct {
    	Utime  int64
    	Stime  int64
    	Cutime int64
    	Cstime int64
    }
    
    type Utimbuf struct {
    	Actime  int64
    	Modtime int64
    }
    
    type Rusage struct {
    	Utime    Timeval
    	Stime    Timeval
    	Maxrss   int64
    	Ixrss    int64
    	Idrss    int64
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 08 16:12:58 UTC 2024
    - 12.1K bytes
    - Viewed (0)
  10. src/cmd/vendor/golang.org/x/sys/unix/ztypes_linux_mipsle.go

    	Jitcnt    int32
    	Calcnt    int32
    	Errcnt    int32
    	Stbcnt    int32
    	Tai       int32
    	_         [44]byte
    }
    
    type Time_t int32
    
    type Tms struct {
    	Utime  int32
    	Stime  int32
    	Cutime int32
    	Cstime int32
    }
    
    type Utimbuf struct {
    	Actime  int32
    	Modtime int32
    }
    
    type Rusage struct {
    	Utime    Timeval
    	Stime    Timeval
    	Maxrss   int32
    	Ixrss    int32
    	Idrss    int32
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 08 16:12:58 UTC 2024
    - 12.3K bytes
    - Viewed (0)
Back to top