Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

In contrast to a delete, a purge completely removes the resource from your OCFL file-system. It also removes any empty parent sub-directories up to the OCFL root directory (called "ocfl-root" by default).


Expand

For example looking at the OCFL root directory of a respository with only the deleted resource "test-resource" before the purge.

Code Block
.
└── ocfl-root/
    ├── 0004-hashed-n-tuple-storage-layout.md
    ├── 0=ocfl_1.1
    ├── 141 <- the repository root resource
    ├── 5ce <- the deleted resource "test-resource"
    ├── extensions
    ├── ocfl_1.1.md
    ├── ocfl_extensions_1.0.md
    └── ocfl_layout.json

After purging the resource "test-resource", the OCFL root looks like this.

Code Block
.
└── ocfl-root/
    ├── 0004-hashed-n-tuple-storage-layout.md
    ├── 0=ocfl_1.1
    ├── 141 <- the repository root resource
    ├── extensions
    ├── ocfl_1.1.md
    ├── ocfl_extensions_1.0.md
    └── ocfl_layout.json

Because no other resource in the repository shared the same starting to the hash of the name, the entire directory structure was removed.

...