Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 17 for GetFileType (0.5 sec)

  1. pkg/volume/util/hostutil/hostutil.go

    	// MakeRShared checks that given path is on a mount with 'rshared' mount
    	// propagation. If not, it bind-mounts the path as rshared.
    	MakeRShared(path string) error
    	// GetFileType checks for file/directory/socket/block/character devices.
    	GetFileType(pathname string) (FileType, error)
    	// PathExists tests if the given path already exists
    	// Error is returned on any other error than "file not found".
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Feb 28 13:38:40 UTC 2024
    - 4.2K bytes
    - Viewed (0)
  2. pkg/volume/util/hostutil/hostutil_windows.go

    		errno, ok := fserr.Err.(syscall.Errno)
    		return ok && errno == windows.ERROR_CANT_ACCESS_FILE
    	}
    
    	return false
    }
    
    // GetFileType checks for sockets/block/character devices
    func (hu *(HostUtil)) GetFileType(pathname string) (FileType, error) {
    	filetype, err := getFileType(pathname)
    
    	// os.Stat will return a 1920 error (windows.ERROR_CANT_ACCESS_FILE) if we use it on a Unix Socket
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Feb 28 13:38:40 UTC 2024
    - 4.7K bytes
    - Viewed (0)
  3. pkg/volume/hostpath/host_path.go

    		return false
    	}
    	pathType, err := ftc.hu.GetFileType(ftc.path)
    	if err != nil {
    		return false
    	}
    	return string(pathType) == string(v1.HostPathFile)
    }
    
    func (ftc *fileTypeChecker) MakeFile() error {
    	return makeFile(ftc.path)
    }
    
    func (ftc *fileTypeChecker) IsDir() bool {
    	if !ftc.Exists() {
    		return false
    	}
    	pathType, err := ftc.hu.GetFileType(ftc.path)
    	if err != nil {
    		return false
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue May 14 06:17:25 UTC 2024
    - 15.3K bytes
    - Viewed (0)
  4. src/internal/poll/sendfile_windows.go

    	defer func() {
    		TestHookDidSendFile(fd, 0, written, err, written > 0)
    	}()
    	if fd.kind == kindPipe {
    		// TransmitFile does not work with pipes
    		return 0, syscall.ESPIPE
    	}
    	if ft, _ := syscall.GetFileType(src); ft == syscall.FILE_TYPE_PIPE {
    		return 0, syscall.ESPIPE
    	}
    
    	if err := fd.writeLock(); err != nil {
    		return 0, err
    	}
    	defer fd.writeUnlock()
    
    	o := &fd.wop
    	o.handle = src
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Apr 26 18:12:56 UTC 2024
    - 2.2K bytes
    - Viewed (0)
  5. src/os/stat_windows.go

    		defer syscall.CloseHandle(h)
    		return statHandle(name, h)
    	}
    	return fi, err
    }
    
    func statHandle(name string, h syscall.Handle) (FileInfo, error) {
    	ft, err := syscall.GetFileType(h)
    	if err != nil {
    		return nil, &PathError{Op: "GetFileType", Path: name, Err: err}
    	}
    	switch ft {
    	case syscall.FILE_TYPE_PIPE, syscall.FILE_TYPE_CHAR:
    		return &fileStat{name: filepathlite.Base(name), filetype: ft}, nil
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 07 18:44:48 UTC 2024
    - 5.2K bytes
    - Viewed (0)
  6. pkg/volume/local/local.go

    	}
    
    	kvh, ok := plugin.host.(volume.KubeletVolumeHost)
    	if !ok {
    		return "", fmt.Errorf("plugin volume host does not implement KubeletVolumeHost interface")
    	}
    
    	fileType, err := kvh.GetHostUtil().GetFileType(spec.PersistentVolume.Spec.Local.Path)
    	if err != nil {
    		return "", err
    	}
    	switch fileType {
    	case hostutil.FileTypeDirectory:
    		return spec.PersistentVolume.Spec.Local.Path, nil
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue May 14 06:17:25 UTC 2024
    - 22.2K bytes
    - Viewed (0)
  7. src/internal/poll/fd_windows.go

    		return err
    	}
    	defer fd.decref()
    	return syscall.Fchdir(fd.Sysfd)
    }
    
    // GetFileType wraps syscall.GetFileType.
    func (fd *FD) GetFileType() (uint32, error) {
    	if err := fd.incref(); err != nil {
    		return 0, err
    	}
    	defer fd.decref()
    	return syscall.GetFileType(fd.Sysfd)
    }
    
    // GetFileInformationByHandle wraps GetFileInformationByHandle.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jan 31 16:50:42 UTC 2024
    - 34.1K bytes
    - Viewed (0)
  8. src/os/types_windows.go

    	LastAccessTime syscall.Filetime
    	LastWriteTime  syscall.Filetime
    	FileSizeHigh   uint32
    	FileSizeLow    uint32
    
    	// from Win32finddata and GetFileInformationByHandleEx
    	ReparseTag uint32
    
    	// what syscall.GetFileType returns
    	filetype uint32
    
    	// used to implement SameFile
    	sync.Mutex
    	path             string
    	vol              uint32
    	idxhi            uint32
    	idxlo            uint32
    	appendNameToPath bool
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 07 18:44:48 UTC 2024
    - 11.7K bytes
    - Viewed (0)
  9. platforms/jvm/language-java/src/main/java/org/gradle/api/internal/tasks/compile/incremental/recomp/AbstractRecompilationSpecProvider.java

                return;
            }
            for (FileChange fileChange : sourceChanges) {
                if (spec.isFullRebuildNeeded()) {
                    return;
                }
                if (fileChange.getFileType() != FileType.FILE) {
                    continue;
                }
    
                String relativeFilePath = fileChange.getNormalizedPath();
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Tue Feb 06 23:55:46 UTC 2024
    - 14.3K bytes
    - Viewed (0)
  10. src/os/file_windows.go

    func newFile(h syscall.Handle, name string, kind string) *File {
    	if kind == "file" {
    		var m uint32
    		if syscall.GetConsoleMode(h, &m) == nil {
    			kind = "console"
    		}
    		if t, err := syscall.GetFileType(h); err == nil && t == syscall.FILE_TYPE_PIPE {
    			kind = "pipe"
    		}
    	}
    
    	f := &File{&file{
    		pfd: poll.FD{
    			Sysfd:         h,
    			IsStream:      true,
    			ZeroReadIsEOF: true,
    		},
    		name: name,
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 30 15:38:38 UTC 2024
    - 13.4K bytes
    - Viewed (0)
Back to top