Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for ExtractFiles (0.16 sec)

  1. src/cmd/go/internal/script/state.go

    			e = regexp.QuoteMeta(e)
    		}
    		return e
    	})
    }
    
    // ExtractFiles extracts the files in ar to the state's current directory,
    // expanding any environment variables within each name.
    //
    // The files must reside within the working directory with which the State was
    // originally created.
    func (s *State) ExtractFiles(ar *txtar.Archive) error {
    	wd := s.workdir
    
    	// Add trailing separator to terminate wd.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jan 31 20:33:02 UTC 2023
    - 6.9K bytes
    - Viewed (0)
  2. src/cmd/go/internal/vcweb/script.go

    	ar := txtar.Parse(scriptContent)
    
    	if err := os.MkdirAll(workDir, 0755); err != nil {
    		return nil, err
    	}
    
    	st, err := s.newState(ctx, workDir)
    	if err != nil {
    		return nil, err
    	}
    	if err := st.ExtractFiles(ar); err != nil {
    		return nil, err
    	}
    
    	scriptName := filepath.Base(scriptPath)
    	scriptLog := new(strings.Builder)
    	err = s.engine.Execute(st, scriptName, bufio.NewReader(bytes.NewReader(ar.Comment)), scriptLog)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Nov 08 19:37:03 UTC 2022
    - 9K bytes
    - Viewed (0)
  3. src/cmd/go/script_test.go

    				t.Fatal(err)
    			}
    
    			// Unpack archive.
    			a, err := txtar.ParseFile(file)
    			if err != nil {
    				t.Fatal(err)
    			}
    			telemetryDir := initScriptDirs(t, s)
    			if err := s.ExtractFiles(a); err != nil {
    				t.Fatal(err)
    			}
    
    			t.Log(time.Now().UTC().Format(time.RFC3339))
    			work, _ := s.LookupEnv("WORK")
    			t.Logf("$WORK=%s", work)
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 03 18:15:22 UTC 2024
    - 12.2K bytes
    - Viewed (0)
Back to top