public async Task ReplaceFolderByPath(string oldPath, string newPath, int businessId, bool copy = false)
        {
            var(index, parent, pathParts) = await ComplexSearchByPath(oldPath, businessId);

            if (index != pathParts.Count())
            {
                throw new Exception("Нет такой папки по данному пути.");
            }

            var(newIndex, newParent, newPathParts) = await ComplexSearchByPath(newPath, businessId);

            if (newIndex != newPathParts.Count())
            {
                throw new Exception("Нет такой папки по данному пути.");
            }

            if (!copy)
            {
                parent.parent_id = newParent.id;
                await _foldersRepo.UpdateFolderAsync(parent);
            }
            else
            {
                var subTree = await _foldersRepo.GetSubTreeAsync(parent.id);

                subTree.Parent = new Tree <Folder> {
                    Value = newParent
                };
                subTree.Value.id        = 0;
                subTree.Value.parent_id = 0;
                NullifyIds(subTree);
                await _foldersRepo.AddFolderSubTreeAsync(subTree);
            }
        }