owncloud / data_exporter

Export/Import for ownCloud user data
GNU General Public License v2.0
7 stars 5 forks source link

Flatten structure of file-layout inside the export dir #124

Closed IljaN closed 4 years ago

IljaN commented 4 years ago

Before this PR all data-types (files, versions, trashbin...) were stored inside a single files directory which closely followed ownClouds home-folder layout. This allowed for fast iteration but also coupled the format to ownCloud which in turn introduced some design quirks (/files/files/) in files.jsonl (#111)

All data type specific folders are now stored in the root directory of the export which allows simpler mapping from metadata (#118). This is also reflected in the architecture: The exporter traverses down from the specific directories instead from the home.

A special "root folder" was introduced in files.jsonl to further decouple things from owncloud and to be able to carry the e-tag for the whole tree. Instead of "/files", "/" is now root in the export.

Path class has been added to reduce path-merging boilerplate.

Related Issue

Closes #111 Related to #118

codecov[bot] commented 4 years ago

Codecov Report

Merging #124 into master will decrease coverage by 0.05%. The diff coverage is 92.85%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #124      +/-   ##
============================================
- Coverage     86.83%   86.78%   -0.06%     
- Complexity      189      197       +8     
============================================
  Files            31       32       +1     
  Lines           904      923      +19     
============================================
+ Hits            785      801      +16     
- Misses          119      122       +3
Impacted Files Coverage Δ Complexity Δ
...s/Iterators/Nodes/RecursiveNodeIteratorFactory.php 100% <ø> (ø) 2 <0> (-1) :arrow_down:
lib/Importer.php 0% <0%> (ø) 4 <0> (ø) :arrow_down:
...actor/MetadataExtractor/FilesMetadataExtractor.php 100% <100%> (ø) 6 <0> (+2) :arrow_up:
lib/Exporter.php 100% <100%> (ø) 3 <0> (ø) :arrow_down:
lib/Importer/FilesImporter.php 94.11% <100%> (-3.89%) 10 <0> (+1)
lib/Utilities/Path.php 100% <100%> (ø) 6 <6> (?)
lib/Extractor/FilesExtractor.php 100% <100%> (ø) 3 <0> (ø) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 491f94d...e0fa537. Read the comment docs.