/// <remarks>
        /// This is overly optimistic (i.e. expects at least one photo per month),
        /// but is mildly more straightforward than lazily creating folders as we go.
        /// </remarks>
        public async Task CreateFolderForEachMonth(FolderModel root)
        {
            var years = await _controller.GetFolders(root);

            foreach (var year in years)
            {
                Console.WriteLine($"{year.Name}");

                var folder = new FolderModel(year.Id, year.Name, root);
                var months = await _controller.GetFolders(folder);

                var missingMonths = ExpectedMonths.Except(months.Select(m => m.Name));

                foreach (var month in missingMonths)
                {
                    Console.WriteLine($"Creating {folder.FullName}/{month}");
                    await _controller.CreateFolder(month, folder);
                }
            }
        }
        public async Task <FolderModel> GetOrCreate(string fullPath)
        {
            await EnsureInitialized();

            if (_foldersByPath.TryGetValue(fullPath, out var folder))
            {
                return(folder);
            }

            // "/root/Pictures/iPhone/2014/02" => ["2014", "02"]
            // +1 for the trailing slash
            var parts = fullPath.Substring(_root.FullName.Length + 1).Split(PathSeparator);

            if (parts.Length == 0)
            {
                throw new ArgumentException("path has no parts");
            }

            FolderModel current = _root;
            string      path    = _root.FullName;

            for (int i = 0; i < parts.Length; i++)
            {
                path = path + PathSeparator + parts[i];
                if (!_foldersByPath.ContainsKey(path))
                {
                    Console.WriteLine($"Creating folder {parts[i]} at {current.FullName}");
                    var child = await _controller.CreateFolder(parts[i], current);

                    _foldersByPath[path] = child;
                    current = child;
                }
                else
                {
                    current = _foldersByPath[path];
                }
            }

            return(_foldersByPath[fullPath]);
        }