fn make_args(&self, input: &Path) -> (Vec<OsString>, InputConf, OutputConf) {
        let input_conf = RefCell::<InputConf>::new(InputConf::StdIn(input.to_path_buf()));
        let output_conf = RefCell::<OutputConf>::new(OutputConf::StdOut);

        let args = Self::parse_command(self.command_str.as_str(), |arg| match arg {
            "IN" if self.copy => {
                let tmp_target = self.random_tmp_file_name();
                input_conf.replace(InputConf::Copied(input.to_path_buf(), tmp_target.clone()));
                tmp_target.into_os_string()
            }
            "IN" => {
                let input = input.to_path_buf();
                input_conf.replace(InputConf::Named(input.clone()));
                input.into_os_string()
            }
            "OUT" => {
                let output = self.output(input);
                output_conf.replace(OutputConf::Named(output.clone()));
                output.into_os_string()
            }
            _ => OsString::from(arg),
        });

        let input_conf = input_conf.into_inner();
        let mut output_conf = output_conf.into_inner();

        if self.in_place {
            output_conf = OutputConf::InPlace(input_conf.input_path().clone())
        }

        (args, input_conf, output_conf)
    }
/// Creates arguments, input and output configuration for processing given input path.
/// The first element of the argument vector contains the program name.
Creates arguments, input and output configuration for processing given input path.
The first element of the argument vector contains the program name.
Creates arguments input and output configuration for processing given input path . The first element of the argument vector contains the program name .
fn make_args(&self, input: &Path) -> (Vec<OsString>, InputConf, OutputConf) {
        let input_conf = RefCell::<InputConf>::new(InputConf::StdIn(input.to_path_buf()));
        let output_conf = RefCell::<OutputConf>::new(OutputConf::StdOut);
        let args = Self::parse_command(self.command_str.as_str(), |arg| match arg {
            "IN" if self.copy => {
                let tmp_target = self.random_tmp_file_name();
                input_conf.replace(InputConf::Copied(input.to_path_buf(), tmp_target.clone()));
                tmp_target.into_os_string()
            }
            "IN" => {
                let input = input.to_path_buf();
                input_conf.replace(InputConf::Named(input.clone()));
                input.into_os_string()
            }
            "OUT" => {
                let output = self.output(input);
                output_conf.replace(OutputConf::Named(output.clone()));
                output.into_os_string()
            }
            _ => OsString::from(arg),
        });
        let input_conf = input_conf.into_inner();
        let mut output_conf = output_conf.into_inner();
        if self.in_place {
            output_conf = OutputConf::InPlace(input_conf.input_path().clone())
        }
        (args, input_conf, output_conf)
    }
fn make_args ( & self , input : & Path ) -> ( Vec < OsString > , InputConf , OutputConf ) { let input_conf = RefCell :: < InputConf > :: new ( InputConf :: StdIn ( input . to_path_buf ( ) ) ) ; let output_conf = RefCell :: < OutputConf > :: new ( OutputConf :: StdOut ) ; let args = Self :: parse_command ( self . command_str . as_str ( ) , | arg | match arg { " " if self . copy => { let tmp_target = self . random_tmp_file_name ( ) ; input_conf . replace ( InputConf :: Copied ( input . to_path_buf ( ) , tmp_target . clone ( ) ) ) ; tmp_target . into_os_string ( ) } " " => { let input = input . to_path_buf ( ) ; input_conf . replace ( InputConf :: Named ( input . clone ( ) ) ) ; input . into_os_string ( ) } " " => { let output = self . output ( input ) ; output_conf . replace ( OutputConf :: Named ( output . clone ( ) ) ) ; output . into_os_string ( ) } _ => OsString :: from ( arg ) , } ) ; let input_conf = input_conf . into_inner ( ) ; let mut output_conf = output_conf . into_inner ( ) ; if self . in_place { output_conf = OutputConf :: InPlace ( input_conf . input_path ( ) . clone ( ) ) } ( args , input_conf , output_conf ) }
Creates arguments, input and output configuration for processing given input path.
Creates arguments input and output configuration for processing given input path .
&self
input
&Path
&self
input
&Path