Making a temporary dir for unpacking a zipfile into

后端 未结 7 590
心在旅途
心在旅途 2020-12-29 23:05

I have a script that checks a zipfile containing a number of matching PDF+textfiles. I want to unpack, or somehow read the textfiles from the zipfile, and just pick out some

7条回答
  •  长发绾君心
    2020-12-29 23:46

    Another option if running on linux with mktemp and access to the exec function is the following:

    
    

    This avoids the potential (although unlikely) race issue above and has the same behavior as the tempnam function.

提交回复
热议问题