// newExFileInfo creates a new winExFileInfo from a os.FileInfo.
191057
func newExFileInfo(fi os.FileInfo, path string) *linuxExFileInfo {
	fid := FID{
		IDLow: fi.Sys().(*syscall.Stat_t).Ino,
	}
	absolute, _ := filepath.Abs(path)
	return &linuxExFileInfo{
		FileInfo: fi,
		fid:      fid,
		path:     filepath.Clean(absolute),
	}
}
904487
func (s *Symlink) GetFileInformation(ctx context.Context, fi *dokan.FileInfo) (a *dokan.Stat, err error) {
	s.parent.folder.fs.logEnter(ctx, "Symlink GetFileInformation")
	defer func() { s.parent.folder.reportErr(ctx, libkbfs.ReadMode, err) }()

	_, _, err = s.parent.folder.fs.config.KBFSOps().Lookup(ctx, s.parent.node, s.name)
	if err != nil {
		return nil, errToDokan(err)
	}

	if s.isTargetADirectory {
		return defaultSymlinkDirInformation()
	}
	return defaultSymlinkFileInformation()
}
760343
func GetFileInfo(
	ctx context.Context, config libkbfs.Config, dir libkbfs.Node, name string) (
	data []byte, t time.Time, err error) {
	node, ei, err := config.KBFSOps().Lookup(ctx, dir, name)
	if err != nil {
		return nil, time.Time{}, err
	}
	nmd, err := config.KBFSOps().GetNodeMetadata(ctx, node)
	if err != nil {
		return nil, time.Time{}, err
	}
	data, err = PrettyJSON(fileInfoFile{nmd, ei.PrevRevisions})
	if err != nil {
		return nil, time.Time{}, err
	}
	return data, time.Unix(0, ei.Mtime), nil
}
614676
func NewFileInfoFile(
	fs *FS, dir libkbfs.Node, name string) *SpecialReadFile {
	return &SpecialReadFile{
		read: func(ctx context.Context) ([]byte, time.Time, error) {
			return libfs.GetFileInfo(ctx, fs.config, dir, name)
		},
		fs: fs,
	}
}
144071
func NewFileRequestsChangePolicyDetails(NewValue *FileRequestsPolicy) *FileRequestsChangePolicyDetails {
	s := new(FileRequestsChangePolicyDetails)
	s.NewValue = NewValue
	return s
}
509747
func GetFileInfo(path string) (os.FileInfo, error) {
	f, err := os.Open(path)
	if err != nil {
		return nil, err
	}
	defer f.Close()
	return f.Stat()
}
290161
func NewNodeInfo(pods ...*v1.Pod) *NodeInfo {
	ni := &NodeInfo{
		requestedResource:   &Resource{},
		nonzeroRequest:      &Resource{},
		allocatableResource: &Resource{},
		TransientInfo:       NewTransientSchedulerInfo(),
		generation:          nextGeneration(),
		usedPorts:           make(HostPortInfo),
		imageStates:         make(map[string]*ImageStateSummary),
	}
	for _, pod := range pods {
		ni.AddPod(pod)
	}
	return ni
}
17699
func NewFileAddCommentType(Description string) *FileAddCommentType {
	s := new(FileAddCommentType)
	s.Description = Description
	return s
}
716481
func newFifos(root, id string, tty, stdin bool) (*cio.FIFOSet, error) {
	root = filepath.Join(root, "io")
	if err := os.MkdirAll(root, 0700); err != nil {
		return nil, err
	}
	fifos, err := cio.NewFIFOSetInDir(root, id, tty)
	if err != nil {
		return nil, err
	}
	if !stdin {
		fifos.Stdin = ""
	}
	return fifos, nil
}
1311744
func NewFileDeleteType(Description string) *FileDeleteType {
	s := new(FileDeleteType)
	s.Description = Description
	return s
}
714635
func NewFIFO(ts ...T) *FIFO {
	s := &FIFO{}
	for i := range ts {
		s.Push(ts[i])
	}
	return s
}
661316
func NewFileRestoreType(Description string) *FileRestoreType {
	s := new(FileRestoreType)
	s.Description = Description
	return s
}
158204
func (tlf *TLF) GetFileInformation(ctx context.Context, fi *dokan.FileInfo) (st *dokan.Stat, err error) {
	dir := tlf.getStoredDir()
	if dir == nil {
		return defaultDirectoryInformation()
	}

	return dir.GetFileInformation(ctx, fi)
}
8871
func newIndexInfo(config *serviceConfig, indexName string) (*registrytypes.IndexInfo, error) {
	var err error
	indexName, err = ValidateIndexName(indexName)
	if err != nil {
		return nil, err
	}

	// Return any configured index info, first.
	if index, ok := config.IndexConfigs[indexName]; ok {
		return index, nil
	}

	// Construct a non-configured index info.
	index := &registrytypes.IndexInfo{
		Name:     indexName,
		Mirrors:  make([]string, 0),
		Official: false,
	}
	index.Secure = isSecureIndex(config, indexName)
	return index, nil
}
1197503
func (f *File) GetFileInformation(ctx context.Context, fi *dokan.FileInfo) (a *dokan.Stat, err error) {
	f.folder.fs.logEnter(ctx, "File GetFileInformation")
	defer func() { f.folder.reportErr(ctx, libkbfs.ReadMode, err) }()

	a, err = eiToStat(f.folder.fs.config.KBFSOps().Stat(ctx, f.node))
	if a != nil {
		f.folder.fs.vlog.CLogf(ctx, libkb.VLog1, "File GetFileInformation node=%v => %v", f.node, *a)
	} else {
		f.folder.fs.log.CDebugf(ctx, "File GetFileInformation node=%v => Error %T %v", f.node, err, err)
	}
	return a, err
}
384759
func (h *fs) enrichFileInfo(path string, fi os.FileInfo) os.FileInfo {
	h.m.Lock()
	if mode, ok := h.fileModes[path]; ok {
		fi = copyFileInfo(fi)
		fi.(*FileInfo).FileMode = mode
	}
	h.m.Unlock()
	return fi
}
563447
func newInfo(infoType string, context []byte) []byte {
	info := append([]byte("Content-Encoding: "), []byte(infoType)...)
	info = append(info, 0)
	// For aes128gcm ctx is not needed.
	if len(context) > 0 {
		info = append(info, []byte("P-256")...)
		info = append(info, context...)
	}
	return info
}