Exemple #1
0
        public IEnumerable <TransferItem> ChildrenGetter(object p)
        {
            TransferItem directory = ((TransferItem)p);

            if (null == directory)
            {
                // Root
                if (!_cache.isValid(null))
                {
                    _cache.put(null, new AttributedList(Transfer.getRoots()));
                    Filter();
                }
            }
            else if (!_cache.isValid(directory))
            {
                _controller.Background(new TransferPromptListAction(this, _controller, _source, _destination, directory, Transfer,
                                                                    _cache));
            }
            // Return list with filtered files included
            AttributedList list = _cache.get(directory);

            for (int i = 0; i < list.size(); i++)
            {
                yield return((TransferItem)list.get(i));
            }
        }
        public IEnumerable <Path> ChildrenGetter(object folder)
        {
            AttributedList list = _cache.get((Path)folder)
                                  .filter(_controller.FilenameComparator, _controller.FilenameFilter);

            for (int i = 0; i < list.size(); i++)
            {
                yield return((Path)list.get(i));
            }
        }
Exemple #3
0
        public IEnumerable <TreePathReference> GetEnumerator()
        {
            if (null == _controller.Workdir)
            {
                yield break;
            }

            AttributedList list = _controller.Workdir.children(_controller.FilenameFilter);

            for (int i = 0; i < list.size(); i++)
            {
                yield return(new TreePathReference((Path)list.get(i)));
            }
        }