Hello
A server accepts files from a client. The files could be any size. The client can communicate the file's size to the server before starting the transfer which is fine. What I am trying to achieve is to be able to respond to the client whether or not there is enough space on the server to store that file before the transfer begins.
The issue of course is that
Java has no way to ascertain the free space on a given filesystem. I cannot go native because the application must be platform independant so I need to find a Java only solution.
Does anyone have any ideas?
My first thought is to write out a temp file of the size of the client file and then if that doesnt error, accept the transfer but this seems like a very poor solution to what should be a simple problem...
Thanks in advance.