io.appium.settings
Version:
App for dealing with Android settings
18 lines • 783 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.scanMedia = scanMedia;
const logger_1 = require("../logger");
const constants_1 = require("../constants");
/**
* Performs recursive media scan at the given destination.
* All successfully scanned items are being added to the device's
* media library.
*
* @param destination File/folder path on the remote device
* @throws {Error} If there was an unexpected error by scanning
*/
async function scanMedia(destination) {
this.log.debug(logger_1.LOG_PREFIX, `Scanning '${destination}' for media files`);
await this.checkBroadcast(['-n', constants_1.MEDIA_SCAN_RECEIVER, '-a', constants_1.MEDIA_SCAN_ACTION, '--es', 'path', destination], 'scan media');
}
//# sourceMappingURL=media.js.map