import {WebpackFrontendFs} from 'projext-plugin-webpack/src/jimpex/frontendFs.js'
WebpackFrontendFs
This service overwrites the Jimpex
default FrontendFs
so it will use the file system
provided by the Webpack middleware instead of using the real file system.
Constructor Summary
Public Constructor | ||
public |
constructor(getDirectory: DevMiddlewareGetDirectory, getFileSystem: DevMiddlewareGetFileSystem) Class constructor. |
Member Summary
Public Members | ||
public |
A function to get the directory the Webpack middleware is using. |
|
public |
A function that returns a Promise with the virtual file system the Webpack middleware uses. |
Method Summary
Public Methods | ||
public |
Delete a file from the file system. |
|
public |
Read a file from the file system. |
|
public |
Write a file on the file system. |
Public Constructors
public constructor(getDirectory: DevMiddlewareGetDirectory, getFileSystem: DevMiddlewareGetFileSystem) source
Class constructor.
Params:
Name | Type | Attribute | Description |
getDirectory | DevMiddlewareGetDirectory | A function to get the directory the Webpack middleware is using. |
|
getFileSystem | DevMiddlewareGetFileSystem | A function to get the virtual file system the Webpack middleware uses. It uses a Promise in order to avoid accessing it before the middleware finishes compiling. |
Public Members
public getDirectory: DevMiddlewareGetDirectory source
A function to get the directory the Webpack middleware is using.
public getFileSystem: DevMiddlewareGetFileSystem source
A function that returns a Promise with the virtual file system the Webpack middleware uses.
Public Methods
public delete(filepath: string): Promise<undefined, Error> source
Delete a file from the file system.
Params:
Name | Type | Attribute | Description |
filepath | string | The path to the file. |