From b8b08aa67da7d7aee2f16469e4791ebca4da87b6 Mon Sep 17 00:00:00 2001 From: Merlin Beutlberger Date: Wed, 18 Jan 2023 13:07:51 +0100 Subject: [PATCH] [INTERNAL] Add FileSystem documentation page --- docs/pages/FileSystem.md | 39 +++++++++++++++++++++++++++++++++++++++ mkdocs.yml | 1 + 2 files changed, 40 insertions(+) create mode 100644 docs/pages/FileSystem.md diff --git a/docs/pages/FileSystem.md b/docs/pages/FileSystem.md new file mode 100644 index 0000000000..3a54d29cba --- /dev/null +++ b/docs/pages/FileSystem.md @@ -0,0 +1,39 @@ +# UI5 FS + +The [UI5 FS](https://github.com/SAP/ui5-fs) provides a UI5-specific file system abstraction + +[**API Reference**](https://sap.github.io/ui5-tooling/v3/api/){: .md-button .sap-icon-initiative } + +### Resources +During the build phase, a modified resource is kept in memory for further processing in other build steps. + +This ensures performance, as physical read and write access for a high number of resources are kept to a minimum. + +The virtual file system offers an abstraction layer from the physical file system. Amongst others, it can combine a bunch of scattered file locations into a well defined, virtualized structure. + +### Adapters +Adapters abstract access to different resource locations. + +The [memory adapter](lib/resources/adapters/Memory.js) represents a virtual file system, which maintains respective resources inside a data structure, whereas the [file system adapter](lib/resources/adapters/FileSystem.js) has direct access to the physical file system. + +### Resource Readers +Maps virtual to physical paths. + +### Collections +Multiple resource readers can be bundled to a collection. There are multiple types of collections which differ in their capability of having read or write access and in the order of how they obtain resources. + +#### Collection +The collection has only read access. + +The collection takes a list of readers. Readers are accessed in parallel: the reader which returns the resource first is used. + +#### Prioritized Collection +The prioritized collection has only read access. + +The collection takes a list of readers. +The readers are accessed prioritized in the same order as they are passed to the collection. + +#### Duplex Collection +The duplex collection has read and write access. + +The collection takes a single reader or collection of readers and a writer instance for writing results. diff --git a/mkdocs.yml b/mkdocs.yml index 4d5841d21b..b55bfdc4f2 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -22,6 +22,7 @@ nav: - Server: pages/Server.md - Builder: pages/Builder.md - Project: pages/Project.md + - File System: pages/FileSystem.md - Upgrade Guides: - Migrate to v3: updates/migrate-v3.md - Migrate to v2: updates/migrate-v2.md