"use strict";
class GetFileCommand {
    constructor($devicesService, $stringParameter, $options) {
        this.$devicesService = $devicesService;
        this.$stringParameter = $stringParameter;
        this.$options = $options;
        this.allowedParameters = [this.$stringParameter];
    }
    execute(args) {
        return (() => {
            this.$devicesService.initialize({ deviceId: this.$options.device, skipInferPlatform: true }).wait();
            let action = (device) => { return (() => device.fileSystem.getFile(args[0]).wait()).future()(); };
            this.$devicesService.execute(action).wait();
        }).future()();
    }
}
exports.GetFileCommand = GetFileCommand;
$injector.registerCommand("device|get-file", GetFileCommand);
