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...
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus