Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for ExampleWalkDir (0.1 sec)

  1. src/io/fs/example_test.go

    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    package fs_test
    
    import (
    	"fmt"
    	"io/fs"
    	"log"
    	"os"
    )
    
    func ExampleWalkDir() {
    	root := "/usr/local/go/bin"
    	fileSystem := os.DirFS(root)
    
    	fs.WalkDir(fileSystem, ".", func(path string, d fs.DirEntry, err error) error {
    		if err != nil {
    			log.Fatal(err)
    		}
    		fmt.Println(path)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 21 03:21:56 UTC 2021
    - 462 bytes
    - Viewed (0)
Back to top