Esempio n. 1
0
        public void SetWorkingFolder(string path)
        {
            if (path == null)
            {
                _currentFolder = _root;
                _workingFolder = null;
                return;
            }

            if (path.StartsWith(_nul.Path))
            {
                throw new InvalidOperationException("Cannot be set to [nul]");
            }

            _currentFolder = GetAbsoluteFolder(path);
            _workingFolder = path;
        }
Esempio n. 2
0
        static IEnumerable <IAzureBlobFile> GetFilesRecursive(IAzureBlobFolder folder)
        {
            var items = folder.EnumItems();

            foreach (var it in items)
            {
                if (it is IAzureBlobFile)
                {
                    yield return((IAzureBlobFile)it);
                }

                if (it is IAzureBlobFolder)
                {
                    var childFolder     = (IAzureBlobFolder)it;
                    var recursive_items = GetFilesRecursive(childFolder);

                    foreach (var rec_it in recursive_items)
                    {
                        yield return(rec_it);
                    }
                }
            }
        }