Create a tempfile without opening it in Ruby

前端 未结 4 2020
悲&欢浪女
悲&欢浪女 2021-01-04 21:11

Is there a way to create a tempfile, without having it opened? I have to run an executable, redirect it\'s output to a file, and then read & parse that. Everything creat

4条回答
  •  独厮守ぢ
    2021-01-04 21:35

    You may want to use pipes.

    If the executable is started from your ruby program, consider using IO.popen.

    If they're different processes, you can try named pipes.

提交回复
热议问题