@ui5/fs/adapters/FileSystem
@ui5/fs/adapters/FileSystem
File system resource adapter
Constructor
new @ui5/fs/adapters/FileSystem(parameters)
Description: The Constructor.
Source: fs/lib/adapters/FileSystem.js, line 24
Parameters:
| Name | Type | Description | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
parameters | object | Parameters Properties:
|
Extends
Methods
byGlob(virPattern, optionsopt) → {Promise<Array<@ui5/fs/Resource>>}
Description: Locates resources by matching glob patterns.
byGlob("**/*.{html,htm}");
byGlob("**/.library");
byGlob("/pony/*");Source: fs/lib/AbstractReader.js, line 51
Overrides: @ui5/fs/adapters/AbstractAdapter#byGlob
Parameters:
| Name | Type | Attributes | Description | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
virPattern | string | Array<string> | glob pattern as string or array of glob patterns for virtual directory structure | |||||||||||
options | object | optional | glob options Properties:
|
Returns:
Promise resolving to list of resources
Type: Promise<Array<@ui5/fs/Resource>>
byPath(virPath, optionsopt) → {Promise<@ui5/fs/Resource>}
Description: Locates resources by matching a given path.
Source: fs/lib/AbstractReader.js, line 78
Overrides: @ui5/fs/adapters/AbstractAdapter#byPath
Parameters:
| Name | Type | Attributes | Description | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
virPath | string | Virtual path | |||||||||||
options | object | optional | Options Properties:
|
Returns:
Promise resolving to a single resource
Type: Promise<@ui5/fs/Resource>
write(resource, optionsopt) → {Promise<undefined>}
Description: Writes the content of a resource to a path.
Source: fs/lib/AbstractReaderWriter.js, line 53
Overrides: @ui5/fs/adapters/AbstractAdapter#write
Parameters:
| Name | Type | Attributes | Description | |||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
resource | @ui5/fs/Resource | Resource to write | ||||||||||||||||
options | object | optional | Properties:
|
Returns:
Promise resolving once data has been written
Type: Promise<undefined>

