Socket
Socket
Sign inDemoInstall

@ui5/fs

Package Overview
Dependencies
15
Maintainers
4
Versions
41
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ui5/fs


Version published
Weekly downloads
193K
increased by0.68%
Maintainers
4
Created
Weekly downloads
 

Package description

What is @ui5/fs?

@ui5/fs is a file system abstraction library designed for the UI5 framework. It provides utilities for managing and processing file resources in a consistent and efficient manner, which is particularly useful for building and developing UI5 applications.

What are @ui5/fs's main functionalities?

Resource Management

This feature allows you to create and manage resources. The code sample demonstrates how to create a resource and retrieve its path.

const { resourceFactory } = require('@ui5/fs');
const resource = resourceFactory.createResource({
  path: '/path/to/resource',
  string: 'content of the resource'
});
console.log(resource.getPath()); // Output: /path/to/resource

Resource Collections

This feature allows you to create collections of resources and perform operations on them. The code sample demonstrates how to create a collection and retrieve a resource by its path.

const { resourceFactory } = require('@ui5/fs');
const resource1 = resourceFactory.createResource({ path: '/path/to/resource1', string: 'content1' });
const resource2 = resourceFactory.createResource({ path: '/path/to/resource2', string: 'content2' });
const collection = resourceFactory.createResourceCollection({
  resources: [resource1, resource2]
});
collection.byPath('/path/to/resource1').then(resource => console.log(resource.getString())); // Output: content1

Resource Filtering

This feature allows you to filter resources based on certain criteria. The code sample demonstrates how to filter resources by their path.

const { resourceFactory } = require('@ui5/fs');
const resource1 = resourceFactory.createResource({ path: '/path/to/resource1', string: 'content1' });
const resource2 = resourceFactory.createResource({ path: '/path/to/resource2', string: 'content2' });
const collection = resourceFactory.createResourceCollection({
  resources: [resource1, resource2]
});
const filteredResources = collection.filter(resource => resource.getPath().includes('resource1'));
filteredResources.forEach(resource => console.log(resource.getPath())); // Output: /path/to/resource1

Other packages similar to @ui5/fs

Changelog

Source

v0.0.1 - 2018-06-06

Bug Fixes

  • AbstractAdapter: Fix normalization of globstar 6d484e8

Readme

Source

UI5 icon

ui5-fs

UI5 specific file system abstraction
Part of the UI5 Build and Development Tooling

Travis CI Build Status npm Package Version

This is a Pre-Alpha release!
The UI5 Build and Development Tooling described here is not intended for productive use yet. Breaking changes are to be expected.

Resources

During build phase a modified resource gets 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 gets kept to a minimum.

The virtual file system offers an abstraction layer from the physical file system. Among others it can combine a bunch of scattered file locations into a well defined, virtualized structure.

Adapters

Adapers abstract resource access to different resource locations.

The [memory adapter] (lib/resources/adapters/Memory.js) represents a virtual filesystem which maintains respective resources inside a data structure, whereas the [file system adapter] (lib/resources/adapters/FileSystem.js) has direct access to the physical filesytem.

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. Those readers get accessed in parallel where the reader which returns the resource first, gets used.

Prioritized Collection

The Prioritized Collection has only read access.

The collection takes a list of readers. Those readers get accessed prioritized in the same order as they got 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.

Contributing

Please check our Contribution Guidelines.

Support

Please follow our Contribution Guidelines on how to report an issue.

Release History

See CHANGELOG.md.

License

This project is licensed under the Apache Software License, Version 2.0 except as noted otherwise in the LICENSE file.

Keywords

FAQs

Last updated on 06 Jun 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc