Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 84 for isdir (0.14 sec)

  1. tensorflow/c/experimental/filesystem/plugins/posix/posix_filesystem.cc

          return;
        }
      } else if (S_ISDIR(st.st_mode)) {
        TF_SetStatus(status, TF_FAILED_PRECONDITION, "target path is a directory");
        return;
      }
    
      // We cannot rename directories yet, so prevent this.
      if (stat(src, &st) != 0) {
        TF_SetStatusFromIOError(status, errno, src);
        return;
      } else if (S_ISDIR(st.st_mode)) {
    C++
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Sun Mar 24 20:08:23 GMT 2024
    - 15.8K bytes
    - Viewed (0)
  2. istioctl/pkg/validate/validate.go

    				continue
    			}
    			isDir = fi.IsDir()
    		}
    
    		if !isDir {
    			processFile(filename)
    			processedFiles[filename] = true
    			continue
    		}
    		if err := processDirectory(filename, func(path string) {
    			processFile(path)
    			processedFiles[path] = true
    		}); err != nil {
    			errs = multierror.Append(errs, err)
    		}
    	}
    Go
    - Registered: Wed Apr 24 22:53:08 GMT 2024
    - Last Modified: Mon Jan 22 17:58:52 GMT 2024
    - 15K bytes
    - Viewed (0)
  3. src/archive/zip/fuzz_test.go

    	"testing"
    )
    
    func FuzzReader(f *testing.F) {
    	testdata, err := os.ReadDir("testdata")
    	if err != nil {
    		f.Fatalf("failed to read testdata directory: %s", err)
    	}
    	for _, de := range testdata {
    		if de.IsDir() {
    			continue
    		}
    		b, err := os.ReadFile(filepath.Join("testdata", de.Name()))
    		if err != nil {
    			f.Fatalf("failed to read testdata: %s", err)
    		}
    		f.Add(b)
    	}
    
    	f.Fuzz(func(t *testing.T, b []byte) {
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Thu Jan 13 18:06:33 GMT 2022
    - 1.7K bytes
    - Viewed (0)
  4. internal/lock/lock_solaris.go

    			err = ErrAlreadyLocked
    		}
    		return nil, err
    	}
    
    	st, err := os.Stat(path)
    	if err != nil {
    		f.Close()
    		return nil, err
    	}
    
    	if st.IsDir() {
    		f.Close()
    		return nil, &os.PathError{
    			Op:   "open",
    			Path: path,
    			Err:  syscall.EISDIR,
    		}
    	}
    
    	return &LockedFile{f}, nil
    }
    
    // TryLockedOpenFile - tries a new write lock, functionality
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Sun Jan 02 17:15:06 GMT 2022
    - 2.8K bytes
    - Viewed (0)
  5. cmd/object-api-datatypes.go

    	ModTime time.Time
    
    	// Total object size.
    	Size int64
    
    	// Actual size is the real size of the object uploaded by client.
    	ActualSize *int64
    
    	// IsDir indicates if the object is prefix.
    	IsDir bool
    
    	// Hex encoded unique entity tag of the object.
    	ETag string
    
    	// Version ID of this object.
    	VersionID string
    
    	// IsLatest indicates if this is the latest current version
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 20.8K bytes
    - Viewed (0)
  6. cni/pkg/install/binaries.go

    	copiedFilenames := sets.String{}
    	srcFiles, err := os.ReadDir(srcDir)
    	if err != nil {
    		return copiedFilenames, err
    	}
    
    	for _, f := range srcFiles {
    		if f.IsDir() {
    			continue
    		}
    
    		filename := f.Name()
    		srcFilepath := filepath.Join(srcDir, filename)
    
    		for _, targetDir := range targetDirs {
    			if err := file.AtomicCopy(srcFilepath, targetDir, filename); err != nil {
    Go
    - Registered: Wed Apr 24 22:53:08 GMT 2024
    - Last Modified: Mon Dec 11 19:10:54 GMT 2023
    - 1.5K bytes
    - Viewed (0)
  7. lib/time/mkzip.go

    		usage()
    	}
    
    	var zb bytes.Buffer
    	zw := zip.NewWriter(&zb)
    	seen := make(map[string]bool)
    	err := filepath.WalkDir(".", func(path string, d fs.DirEntry, err error) error {
    		if d.IsDir() {
    			return nil
    		}
    		data, err := os.ReadFile(path)
    		if err != nil {
    			log.Fatal(err)
    		}
    		if strings.HasSuffix(path, ".zip") {
    			log.Fatalf("unexpected file during walk: %s", path)
    		}
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Mon Mar 04 17:32:07 GMT 2024
    - 2.1K bytes
    - Viewed (0)
  8. src/cmd/cgo/internal/cgotest/overlaydir.go

    				return err
    			}
    			perm = info.Mode() & os.ModePerm
    		}
    
    		// Always copy directories (don't symlink them).
    		// If we add a file in the overlay, we don't want to add it in the original.
    		if info.IsDir() {
    			return os.MkdirAll(dstPath, perm|0200)
    		}
    
    		// If the OS supports symlinks, use them instead of copying bytes.
    		if err := os.Symlink(srcPath, dstPath); err == nil {
    			return nil
    		}
    
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Mon May 22 20:56:09 GMT 2023
    - 1.7K bytes
    - Viewed (0)
  9. src/archive/zip/struct.go

    func (fi headerFileInfo) Size() int64 {
    	if fi.fh.UncompressedSize64 > 0 {
    		return int64(fi.fh.UncompressedSize64)
    	}
    	return int64(fi.fh.UncompressedSize)
    }
    func (fi headerFileInfo) IsDir() bool { return fi.Mode().IsDir() }
    func (fi headerFileInfo) ModTime() time.Time {
    	if fi.fh.Modified.IsZero() {
    		return fi.fh.ModTime()
    	}
    	return fi.fh.Modified.UTC()
    }
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Fri Oct 13 18:36:46 GMT 2023
    - 12.1K bytes
    - Viewed (0)
  10. internal/lock/lock_nix.go

    			err = ErrAlreadyLocked
    		}
    		return nil, err
    	}
    
    	st, err := os.Stat(path)
    	if err != nil {
    		f.Close()
    		return nil, err
    	}
    
    	if st.IsDir() {
    		f.Close()
    		return nil, &os.PathError{
    			Op:   "open",
    			Path: path,
    			Err:  syscall.EISDIR,
    		}
    	}
    
    	return &LockedFile{File: f}, nil
    }
    
    // TryLockedOpenFile - tries a new write lock, functionality
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Thu Aug 19 01:35:22 GMT 2021
    - 2.8K bytes
    - Viewed (0)
Back to top