@@ -381,12 +381,6 @@ Specifications should provide an API for accessing its resources via ui5-fs read
381381
382382The proposed resource access APIs for specifications are as follows:
383383
384- **To be discussed/To be done:**
385- 1. API Names
386- 1. Add DuplexCollection APIs to actually modify the resources of a project?
387- * Scenario: Modify resources using buildtime reader/writer and read them using runtime reader
388- 1. Specification version check API
389-
390384` ` ` js
391385/**
392386* Get a resource reader for the root directory of the project
@@ -395,30 +389,39 @@ The proposed resource access APIs for specifications are as follows:
395389* @returns {module:@ui5/fs.ReaderCollection} Reader collection
396390*/
397391getRootReader () {}
392+ ` ` `
398393
399- /**
400- * Get a resource reader for the sources of the project (excluding any test resources)
401- *
402- * @public
403- * @returns {module:@ui5/fs.ReaderCollection} Reader collection
404- */
405- getSourceReader () {}
394+ And additionally for project specifications:
395+
396+ ` ` ` js
406397
407398/**
408- * Get a resource reader for accessing the project resources the same way the UI5 runtime would do
409- *
410- * @public
411- * @returns {module:@ui5/fs.ReaderCollection} Reader collection
412- */
413- getRuntimeReader () {}
399+ * Get a [ReaderCollection] {@link module: @ui5/fs.ReaderCollection} for accessing all resources of the
400+ * project in the specified "style":
401+ *
402+ * <ul>
403+ * <li><b>buildtime</b>: Resource paths are always prefixed with <code>/resources/</code>
404+ * or <code>/test-resources/</code> followed by the project's namespace</li>
405+ * <li><b>runtime</b>: Access resources the same way the UI5 runtime would do</li>
406+ * <li><b>flat:</b> No prefix, no namespace</li>
407+ * </ul>
408+ *
409+ * @public
410+ * @param {object} [options]
411+ * @param {string} [options.style= buildtime ] Path style to access resources. Can be "buildtime", "runtime" or "flat"
412+ * This parameter might be ignored by some project types
413+ * @returns {module:@ui5/fs.ReaderCollection} Reader collection allowing access to all resources of the project
414+ */
415+ getReader (options ) {}
414416
415417/**
416- * Get a resource reader for accessing the project resources during the build process
418+ * Get a [DuplexCollection] {@link module: @ui5/fs.DuplexCollection} for accessing and modifying a
419+ * project's resources. This is always of style <code>buildtime</code>.
417420*
418421* @public
419- * @returns {module:@ui5/fs.ReaderCollection} Reader collection
422+ * @returns {module:@ui5/fs.DuplexCollection} DuplexCollection
420423*/
421- getBuildtimeReader () {}
424+ getWorkspace () {}
422425` ` `
423426
424427### Compatibility
0 commit comments