[PATCH] D18467: Add disk_space() to llvm::fs

Aaron Ballman via llvm-commits llvm-commits at lists.llvm.org
Sun Mar 27 10:37:15 PDT 2016

On Sun, Mar 27, 2016 at 1:23 PM, Rafael EspĂ­ndola
<rafael.espindola at gmail.com> wrote:
> On 27 March 2016 at 13:13, Aaron Ballman <aaron.ballman at gmail.com> wrote:
>> aaron.ballman added a subscriber: aaron.ballman.
>> aaron.ballman added a comment.
>> Is there a reason we need this API?
> It is for http://reviews.llvm.org/D18422

Hmm, this will suffer from TOCTOU issues, but I don't think those
should be overly problematic unless the user expects exact behavior
(which I don't think they will). Also, you should be aware that the
Win32 call takes disk quotas into account, so it may not report
accurate values for total disk space availability (which is the
correct behavior for your use case, but may not be obvious for the
caller of the fs function).

Win32 bits LGTM with that in mind.


More information about the llvm-commits mailing list