// NewFolder returns a new Folder instance
978323
func NewFolder(Id string, Name string) *Folder {
	s := new(Folder)
	s.Id = Id
	s.Name = Name
	return s
}
575360
func NewCacher(data map[string]interface{}) *Cacher {
	if data == nil {
		data = make(map[string]interface{})
	}
	return &Cacher{
		data: data,
	}
}
1181286
func NewMDServerDir(
	config mdServerLocalConfig, dirPath string) (*MDServerDisk, error) {
	return newMDServerDisk(config, dirPath, nil)
}
822553
func NewListFoldersResult(Entries []*SharedFolderMetadata) *ListFoldersResult {
	s := new(ListFoldersResult)
	s.Entries = Entries
	return s
}
1112905
func NewCreateFolderBatchArg(Paths []string) *CreateFolderBatchArg {
	s := new(CreateFolderBatchArg)
	s.Paths = Paths
	s.Autorename = false
	s.ForceAsync = false
	return s
}
520101
func (m *Manager) FindFolder(name string) string {
	for _, dir := range m.dirs {
		p := filepath.Join(dir, name)
		if files.Exist(p) {
			return p
		}
	}
	return ""
}
200954
func (b *BigIP) PatchFolder(name string, config *Folder) error {
	return b.patch(config, uriSys, uriFolder, name)
}
101108
func (b *BigIP) GetFolder(name string) (*Folder, error) {
	var folder Folder
	err, ok := b.getForEntity(&folder, uriSys, uriFolder, name)
	if err != nil {
		return nil, err
	}
	if !ok {
		return nil, nil
	}

	return &folder, nil
}
421645
func (m *Manager) AddFolder(dirs ...string) {
	m.dirs = append(m.dirs, dirs...)
}
604265
func (b *BigIP) AddFolder(config *Folder) error {

	return b.post(config, uriSys, uriFolder)
}
278510
func New(ctx context.Context, c *isolatedclient.Client, hash isolated.HexDigest,
	outputDir string, options *Options) *Downloader {

	var opt Options
	if options != nil {
		opt = *options
	}
	if opt.MaxConcurrentJobs == 0 {
		opt.MaxConcurrentJobs = 8
	}
	if opt.MaxFileStatsInterval == 0 {
		opt.MaxFileStatsInterval = time.Second * 5
	}

	interval := 100 * time.Millisecond
	if interval > opt.MaxFileStatsInterval {
		interval = opt.MaxFileStatsInterval
	}

	ctx2, cancel := context.WithCancel(ctx)
	ret := &Downloader{
		ctx:       ctx2,
		cancel:    cancel,
		c:         c,
		options:   opt,
		interval:  interval,
		dirCache:  stringset.New(0),
		rootHash:  hash,
		outputDir: normalizePathSeparator(outputDir),
		isoMap:    map[isolated.HexDigest]*isolated.Isolated{},
	}
	return ret
}
1199538
func NewCreateFolderResult(Metadata *FolderMetadata) *CreateFolderResult {
	s := new(CreateFolderResult)
	s.Metadata = Metadata
	return s
}
20194
func NewFolderLogInfo(Path *PathLogInfo) *FolderLogInfo {
	s := new(FolderLogInfo)
	s.Path = Path
	return s
}
1279409
func NewCreateFolderType(Description string) *CreateFolderType {
	s := new(CreateFolderType)
	s.Description = Description
	return s
}
1251682
func (f *Folder) findFolder(path []string) *Folder {
	if len(path) < 1 {
		return f
	}
	name := path[0]
	if next, found := f.Folders[name]; found {
		return next.findFolder(path[1:])
	}
	return nil
}
1160680
func NewPaperFolderLogInfo(FolderId string, FolderName string) *PaperFolderLogInfo {
	s := new(PaperFolderLogInfo)
	s.FolderId = FolderId
	s.FolderName = FolderName
	return s
}
1141972
func NewFs(dir string, mode os.FileMode) (FileSystem, error) {
	fs := &stdFs{root: dir, init: func() error {
		return os.MkdirAll(dir, mode)
	}}
	return fs, fs.init()
}