文件操作 - download_windows.go
返回文件管理
返回主菜单
删除本文件
文件: /usr/share/go-1.23/src/cmd/vendor/golang.org/x/telemetry/internal/configstore/download_windows.go
编辑文件内容
// Copyright 2024 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. //go:build windows package configstore import ( "os/exec" "syscall" "golang.org/x/sys/windows" ) func init() { needNoConsole = needNoConsoleWindows } func needNoConsoleWindows(cmd *exec.Cmd) { // The uploader main process is likely a daemonized process with no console. // (see x/telemetry/start_windows.go) The console creation behavior when // a parent is a console process without console is not clearly documented // but empirically we observed the new console is created and attached to the // subprocess in the default setup. // // Ensure no new console is attached to the subprocess by setting CREATE_NO_WINDOW. // https://learn.microsoft.com/en-us/windows/console/creation-of-a-console // https://learn.microsoft.com/en-us/windows/win32/procthread/process-creation-flags cmd.SysProcAttr = &syscall.SysProcAttr{ CreationFlags: windows.CREATE_NO_WINDOW, } }
修改文件时间
将文件时间修改为当前时间的前一年
删除文件