Limitations of TEMP directory in Windows?

前端 未结 4 576
长发绾君心
长发绾君心 2021-01-19 00:09

I have an application written in Python that\'s writing large amounts of data to the %TEMP% folder. Oddly, every once and awhile, it dies, returning IOEr

4条回答
  •  星月不相逢
    2021-01-19 00:31

    Using a FAT32 filesystem I can imagine this happening when:

    • Writing a lot of data to one file, and you reach the 4GB file size cap.
    • Or when you are creating a lot of small files and reaching the 2^16-2 files per directory cap.

    Apart from this, I don't know of any limitations the system can impose on the temp folder, apart from the phyiscal partition actually being full.

    Another limitation is as Mike Atlas has suggested the GetTempFileName() function which creates files of type tmpXXXX.tmp. Although you might not be using it directly, verify that the %TEMP% folder does not contain too many of them (2^16).

    And maybe the obvious, have you tried emptying the %TEMP% folder before running the utility?

提交回复
热议问题