mirror of
https://github.com/balena-io/etcher.git
synced 2025-04-24 15:27:17 +00:00
doc(image-stream): document that .getFromFilePath also resolves metadata (#1217)
See: https://github.com/resin-io/etcher/pull/1211#issuecomment-288896853 Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
This commit is contained in:
parent
180802b985
commit
724d47fb6a
@ -31,7 +31,8 @@ const errors = require('../shared/errors');
|
||||
* @public
|
||||
*
|
||||
* @description
|
||||
* This function resolves an object containing the following properties:
|
||||
* This function resolves an object containing the following properties,
|
||||
* along with various extra metadata:
|
||||
*
|
||||
* - `Number size`: The input file size.
|
||||
*
|
||||
@ -55,6 +56,11 @@ const errors = require('../shared/errors');
|
||||
* const imageStream = require('./lib/image-stream');
|
||||
*
|
||||
* imageStream.getFromFilePath('path/to/rpi.img.xz').then((image) => {
|
||||
* console.log(`The image display name is: ${image.name}`);
|
||||
* console.log(`The image url is: ${image.url}`);
|
||||
* console.log(`The image support url is: ${image.supportUrl}`);
|
||||
* console.log(`The image logo is: ${image.logo}`);
|
||||
*
|
||||
* image.stream
|
||||
* .pipe(image.transform)
|
||||
* .pipe(fs.createWriteStream('/dev/disk2'));
|
||||
|
Loading…
x
Reference in New Issue
Block a user