Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for fdToFile (0.07 sec)

  1. src/syscall/fs_js.go

    	dirIdx  int // entries[:dirIdx] have already been returned in ReadDirent
    	pos     int64
    	seeked  bool
    }
    
    var filesMu sync.Mutex
    var files = map[int]*jsFile{
    	0: {},
    	1: {},
    	2: {},
    }
    
    func fdToFile(fd int) (*jsFile, error) {
    	filesMu.Lock()
    	f, ok := files[fd]
    	filesMu.Unlock()
    	if !ok {
    		return nil, EBADF
    	}
    	return f, nil
    }
    
    func Open(path string, openmode int, perm uint32) (int, error) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 11 18:19:17 UTC 2023
    - 10.8K bytes
    - Viewed (0)
Back to top