I want to use FileUtils to copy via ruby.
This works, but sometimes my second hdd could be almost full.
In this case, my script will fail because it can not copy 100%.
So now I need a safeguard, and I want to find out how much space is left
on a device.
Is this possible with ruby alone? To tell me “Ok, hdd1 has 1 gigabyte
empty space left”. I could solve this on linux with df / free but my
ruby script should also work for windows (so that I can backup things on
So a pure ruby solution is preferred.