Using FILE_ATTRIBUTE_TEMPORARY and FILE_FLAG_DELETE_ON_CLOSE

前端 未结 2 756
花落未央
花落未央 2021-01-17 12:11

I am using the two flags FILE_ATTRIBUTE_TEMPORARY and FILE_FLAG_DELETE_ON_CLOSE while creating temporary files in my C++ application.

Acco

相关标签:
2条回答
  • 2021-01-17 12:20

    It just says that the file will never be flushed to disk. That means, while it exists in your filesystem, it will never be physically stored on your hard drive. The file system will show it though, with actual size and all.

    0 讨论(0)
  • 2021-01-17 12:32

    Later on in that same link, there is the quote:

    If you exceed available memory, the memory manager will flush the file data to disk. This causes a performance hit, but your operation will succeed instead of failing.

    Marking a file as temporary will tell the system it doesn't need to be on disk, but it doesn't prevent it from being put there, either.

    0 讨论(0)
提交回复
热议问题