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