// GetFileInformation for dokan.
192428
func (s *Alias) GetFileInformation(context.Context, *dokan.FileInfo) (a *dokan.Stat, err error) {
	return defaultSymlinkDirInformation()
}
1139574
func writeCompressedFileInfo(w io.Writer, file *fileInfo, r io.Reader) error {
	err := t.ExecuteTemplate(w, "CompressedFileInfo-Before", file)
	if err != nil {
		return err
	}
	sw := &stringWriter{Writer: w}
	gw := gzip.NewWriter(sw)
	_, err = io.Copy(gw, r)
	if err != nil {
		return err
	}
	err = gw.Close()
	if err != nil {
		return err
	}
	if sw.N >= file.UncompressedSize {
		return errCompressedNotSmaller
	}
	err = t.ExecuteTemplate(w, "CompressedFileInfo-After", file)
	return err
}
1359150
func GetFormat(X *xgbutil.XUtil, depth byte) *xproto.Format {
	for _, pixForm := range X.Setup().PixmapFormats {
		if pixForm.Depth == depth {
			return &pixForm
		}
	}
	return nil
}
1274519
func (kl *Kubelet) getPodVolumeDeviceDir(podUID types.UID, pluginName string) string {
	return filepath.Join(kl.getPodVolumeDevicesDir(podUID), pluginName)
}
1063534
func (b *Bsteam) handleFileInfo(msg *config.Message, f interface{}) error {
	if _, ok := f.(config.FileInfo); !ok {
		return fmt.Errorf("handleFileInfo cast failed %#v", f)
	}
	fi := f.(config.FileInfo)
	if fi.Comment != "" {
		msg.Text += fi.Comment + ": "
	}
	if fi.URL != "" {
		msg.Text = fi.URL
		if fi.Comment != "" {
			msg.Text = fi.Comment + ": " + fi.URL
		}
	}
	return nil
}
589439
func (h *Server) GetFormation(w http.ResponseWriter, r *http.Request) error {
	ctx := r.Context()

	app, err := h.findApp(r)
	if err != nil {
		return err
	}

	formation, err := h.ListScale(ctx, app)
	if err != nil {
		return err
	}

	var resp []*Formation
	for name, proc := range formation {
		resp = append(resp, &Formation{
			Type:     name,
			Quantity: proc.Quantity,
			Size:     proc.Constraints().String(),
		})
	}

	w.WriteHeader(200)
	return Encode(w, resp)
}
689749
func (f *SpecialReadFile) GetFileInformation(ctx context.Context, fi *dokan.FileInfo) (*dokan.Stat, error) {
	f.fs.logEnter(ctx, "SpecialReadFile GetFileInformation")
	data, t, err := f.read(ctx)
	if err != nil {
		return nil, err
	}

	// Some apps (e.g., Chrome) get confused if we use a 0 size
	// here, as is usual for pseudofiles. So return the actual
	// size, even though it may be racy.
	a, err := defaultFileInformation()
	if err != nil {
		return nil, err
	}
	a.FileAttributes |= dokan.FileAttributeReadonly
	a.FileSize = int64(len(data))
	a.LastWrite = t
	a.LastAccess = t
	a.Creation = t
	return a, nil
}
1197559
func getFormatter(f string) (Formatter, error) {
	registry.RLock()
	defer registry.RUnlock()

	formatter := registry.r[f]
	if formatter == nil {
		return nil, errors.Reason("unknown formatter: %q", f).Err()
	}
	return formatter, nil
}
584255
func (a *Client) GetFilesFileidentifier(params *GetFilesFileidentifierParams, authInfo runtime.ClientAuthInfoWriter) (*GetFilesFileidentifierOK, error) {
	// TODO: Validate the params before sending
	if params == nil {
		params = NewGetFilesFileidentifierParams()
	}

	result, err := a.transport.Submit(&runtime.ClientOperation{
		ID:                 "GetFilesFileidentifier",
		Method:             "GET",
		PathPattern:        "/files/{fileidentifier}",
		ProducesMediaTypes: []string{"application/json", "application/x-gzip"},
		ConsumesMediaTypes: []string{"application/json"},
		Schemes:            []string{"http", "https"},
		Params:             params,
		Reader:             &GetFilesFileidentifierReader{formats: a.formats},
		AuthInfo:           authInfo,
	})
	if err != nil {
		return nil, err
	}
	return result.(*GetFilesFileidentifierOK), nil
}
454212
func GetFormat(in io.Reader) (*Format, error) {
	var dec vorbis.Decoder
	r := oggReader{source: in}
	p, err := r.NextPacket()
	if err != nil {
		return nil, err
	}
	err = dec.ReadHeader(p)
	if err != nil {
		return nil, err
	}
	return &Format{
		SampleRate: dec.SampleRate(),
		Channels:   dec.Channels(),
		Bitrate:    dec.Bitrate,
	}, nil
}
1008488
func pieceEndFileIndex(pieceEndOffset int64, files []*File) int {
	for i, f := range files {
		if f.offset+f.length >= pieceEndOffset {
			return i + 1
		}
	}
	return 0
}
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
}
1365832
func getDisksInfo(disks []StorageAPI) (disksInfo []DiskInfo, onlineDisks int, offlineDisks int) {
	disksInfo = make([]DiskInfo, len(disks))
	for i, storageDisk := range disks {
		if storageDisk == nil {
			// Storage disk is empty, perhaps ignored disk or not available.
			offlineDisks++
			continue
		}
		info, err := storageDisk.DiskInfo()
		if err != nil {
			ctx := context.Background()
			logger.GetReqInfo(ctx).AppendTags("disk", storageDisk.String())
			logger.LogIf(ctx, err)
			if IsErr(err, baseErrs...) {
				offlineDisks++
				continue
			}
		}
		onlineDisks++
		disksInfo[i] = info
	}

	// Success.
	return disksInfo, onlineDisks, offlineDisks
}
634692
func (f *FS) GetVolumeInformation(ctx context.Context) (dokan.VolumeInformation, error) {
	// TODO should this be explicitely refused to other users?
	// As the mount is limited to current session there is little need.
	return vinfo, nil
}
1313058
func (kl *Kubelet) getPodVolumeDir(podUID types.UID, pluginName string, volumeName string) string {
	return filepath.Join(kl.getPodVolumesDir(podUID), pluginName, volumeName)
}
1130512
func (surface *ImageSurface) GetFormat() Format {
	ret := Format(C.cairo_image_surface_get_format(surface.Ptr))
	if err := surface.status(); err != nil {
		panic(err)
	}
	return ret
}
489555
func (c *DOM) GetFileInfo(objectId string) (string, error) {
	var v DOMGetFileInfoParams
	v.ObjectId = objectId
	return c.GetFileInfoWithParams(&v)
}