Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 85 for DirEntry (0.17 sec)

  1. subprojects/core/src/main/java/org/gradle/api/internal/tasks/BaseSnapshotInputsBuildOperationResult.java

                }
    
                public String getHash() {
                    return hash;
                }
            }
    
            static class DirEntry extends Entry {
    
                private final List<Entry> children = new ArrayList<>();
    
                DirEntry(String path) {
                    super(path);
                }
    
                public Collection<Entry> getChildren() {
                    return children;
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Mon Feb 05 11:36:42 UTC 2024
    - 14.9K bytes
    - Viewed (0)
  2. src/io/fs/format.go

    	}
    
    	return string(b)
    }
    
    // FormatDirEntry returns a formatted version of dir for human readability.
    // Implementations of [DirEntry] can call this from a String method.
    // The outputs for a directory named subdir and a file named hello.go are:
    //
    //	d subdir/
    //	- hello.go
    func FormatDirEntry(dir DirEntry) string {
    	name := dir.Name()
    	b := make([]byte, 0, 5+len(name))
    
    	// The Type method does not return any permission bits,
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Oct 18 19:34:35 UTC 2023
    - 1.7K bytes
    - Viewed (0)
  3. pkg/kubelet/container/testing/mockdirentry.go

    limitations under the License.
    */
    
    // Code generated by MockGen.
    // Source: os (interfaces: DirEntry)
    
    package testing
    
    import (
    	fs "io/fs"
    	reflect "reflect"
    
    	gomock "go.uber.org/mock/gomock"
    )
    
    // MockDirEntry is a mock of DirEntry interface.
    type MockDirEntry struct {
    	ctrl     *gomock.Controller
    	recorder *MockDirEntryMockRecorder
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Mar 07 08:12:16 UTC 2024
    - 3K bytes
    - Viewed (0)
  4. src/testing/fstest/mapfs.go

    	return 0, &fs.PathError{Op: "read", Path: d.path, Err: fs.ErrInvalid}
    }
    
    func (d *mapDir) ReadDir(count int) ([]fs.DirEntry, error) {
    	n := len(d.entry) - d.offset
    	if n == 0 && count > 0 {
    		return nil, io.EOF
    	}
    	if count > 0 && n > count {
    		n = count
    	}
    	list := make([]fs.DirEntry, n)
    	for i := range list {
    		list[i] = &d.entry[d.offset+i]
    	}
    	d.offset += n
    	return list, nil
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 7.1K bytes
    - Viewed (0)
  5. src/io/fs/example_test.go

    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)
    		return nil
    	})
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 21 03:21:56 UTC 2021
    - 462 bytes
    - Viewed (0)
  6. src/embed/embed.go

    )
    
    // A file is a single file in the FS.
    // It implements fs.FileInfo and fs.DirEntry.
    type file struct {
    	// The compiler knows the layout of this struct.
    	// See cmd/compile/internal/staticdata's WriteEmbed.
    	name string
    	data string
    	hash [16]byte // truncated SHA256 hash
    }
    
    var (
    	_ fs.FileInfo = (*file)(nil)
    	_ fs.DirEntry = (*file)(nil)
    )
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 20 19:42:51 UTC 2024
    - 13.5K bytes
    - Viewed (0)
  7. src/cmd/go/internal/toolchain/path_none.go

    }
    
    // pathVersion returns the Go version implemented by the file
    // described by de and info in directory dir.
    // The analysis only uses the name itself; it does not run the program.
    func pathVersion(dir string, de fs.DirEntry, info fs.FileInfo) (string, bool) {
    	return "", false
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 31 15:15:19 UTC 2023
    - 620 bytes
    - Viewed (0)
  8. src/testing/fstest/testfs_test.go

    	f, err := MapFS(fsys).Open(name)
    	if err != nil {
    		return nil, err
    	}
    	return &shuffledFile{File: f}, nil
    }
    
    type shuffledFile struct{ fs.File }
    
    func (f *shuffledFile) ReadDir(n int) ([]fs.DirEntry, error) {
    	dirents, err := f.File.(fs.ReadDirFile).ReadDir(n)
    	// Shuffle in a deterministic way, all we care about is making sure that the
    	// list of directory entries is not is the lexicographic order.
    	//
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 2.9K bytes
    - Viewed (0)
  9. src/cmd/go/internal/toolchain/path_plan9.go

    }
    
    // pathVersion returns the Go version implemented by the file
    // described by de and info in directory dir.
    // The analysis only uses the name itself; it does not run the program.
    func pathVersion(dir string, de fs.DirEntry, info fs.FileInfo) (string, bool) {
    	v := gover.FromToolchain(de.Name())
    	if v == "" || info.Mode()&0111 == 0 {
    		return "", false
    	}
    	return v, true
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 31 15:15:19 UTC 2023
    - 764 bytes
    - Viewed (0)
  10. src/testing/fstest/testfs.go

    // The order of the lists need not match.
    func (t *fsTester) checkDirList(dir, desc string, list1, list2 []fs.DirEntry) {
    	old := make(map[string]fs.DirEntry)
    	checkMode := func(entry fs.DirEntry) {
    		if entry.IsDir() != (entry.Type()&fs.ModeDir != 0) {
    			if entry.IsDir() {
    				t.errorf("%s: ReadDir returned %s with IsDir() = true, Type() & ModeDir = 0", dir, entry.Name())
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 16.3K bytes
    - Viewed (0)
Back to top