You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Anuradha S.Athreya" <an...@world2web.com> on 2005/08/24 06:35:23 UTC

Check Disk space before file upload

Hello,

How can I check for disk space  on the server before uploading a file on the
server?



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Check Disk space before file upload

Posted by Dakota Jack <da...@gmail.com>.
Thanks!

On 8/23/05, Frank W. Zammetti <fz...@omnytex.com> wrote:
> Hi Jack,
> 
> You can grab the latest version off the Bugzilla ticket:
> 
> http://issues.apache.org/bugzilla/show_bug.cgi?id=36325
> 
> It's one of those things that you'll look at the code and go "D'oh!
> That's obvious as hell!", but amazingly I couldn't find anything similar
> anywhere before I wrote it (there *must* be something, I just didn't
> turn it up).
> 
> Frank
> 
> Dakota Jack wrote:
> > Frank, could you shoot this code to me?  That sounds interesting as
> > all get out!  Thanks ahead of time.
> >
> > On 8/23/05, Frank W. Zammetti <fz...@omnytex.com> wrote:
> >
> >>There's no easy cross-platform way to do this, believe it or not.  Seems
> >>like it should be in the SDK, but it isn't.
> >>
> >>There is however some code I contributed to the Commons IO project that
> >>does exactly this.  It is currently in SVN only, but I just submitted
> >>some updates today that hopefully will allow it to be in the upcoming
> >>1.1 (I believe) release).
> >>
> >>In the mean time, you can grab FileSystemUtils.java from SVN and give it
> >>a shot.  It depends on one other class from IO (ByteArrayOutputStream I
> >>think), but you can use the standard version instead, it will compile
> >>fine against it (IIRC, this adds the possibility of some other
> >>exceptions you'd have to potentially handle, but otherwise it works).
> >>
> >>Frank
> >>
> >>Anuradha S.Athreya wrote:
> >>
> >>>Hello,
> >>>
> >>>How can I check for disk space  on the server before uploading a file on the
> >>>server?
> >>>
> >>>
> >>>
> >>>---------------------------------------------------------------------
> >>>To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> >>>For additional commands, e-mail: user-help@struts.apache.org
> >>>
> >>>
> >>>
> >>>
> >>>
> >>
> >>
> >>
> >>---------------------------------------------------------------------
> >>To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> >>For additional commands, e-mail: user-help@struts.apache.org
> >>
> >>
> >
> >
> >
> 
> --
> Frank W. Zammetti
> Founder and Chief Software Architect
> Omnytex Technologies
> http://www.omnytex.com
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
> 


-- 
"You can lead a horse to water but you cannot make it float on its back."
~Dakota Jack~

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Check Disk space before file upload

Posted by "Frank W. Zammetti" <fz...@omnytex.com>.
Thanks... I think :)

Frank

David G. Friedman wrote:
> Frank,
> 
> That's a very interesting bit of coding. :)
> 
> Regards,
> David
> 
> -----Original Message-----
> From: Frank W. Zammetti [mailto:fzlists@omnytex.com]
> Sent: Wednesday, August 24, 2005 1:06 AM
> To: Struts Users Mailing List
> Subject: Re: Check Disk space before file upload
> 
> 
> Hi Jack,
> 
> You can grab the latest version off the Bugzilla ticket:
> 
> http://issues.apache.org/bugzilla/show_bug.cgi?id=36325
> 
> It's one of those things that you'll look at the code and go "D'oh!
> That's obvious as hell!", but amazingly I couldn't find anything similar
> anywhere before I wrote it (there *must* be something, I just didn't
> turn it up).
> 
> Frank
> 
> Dakota Jack wrote:
> 
>>Frank, could you shoot this code to me?  That sounds interesting as
>>all get out!  Thanks ahead of time.
>>
>>On 8/23/05, Frank W. Zammetti <fz...@omnytex.com> wrote:
>>
>>
>>>There's no easy cross-platform way to do this, believe it or not.  Seems
>>>like it should be in the SDK, but it isn't.
>>>
>>>There is however some code I contributed to the Commons IO project that
>>>does exactly this.  It is currently in SVN only, but I just submitted
>>>some updates today that hopefully will allow it to be in the upcoming
>>>1.1 (I believe) release).
>>>
>>>In the mean time, you can grab FileSystemUtils.java from SVN and give it
>>>a shot.  It depends on one other class from IO (ByteArrayOutputStream I
>>>think), but you can use the standard version instead, it will compile
>>>fine against it (IIRC, this adds the possibility of some other
>>>exceptions you'd have to potentially handle, but otherwise it works).
>>>
>>>Frank
>>>
>>>Anuradha S.Athreya wrote:
>>>
>>>
>>>>Hello,
>>>>
>>>>How can I check for disk space  on the server before uploading a file on
> 
> the
> 
>>>>server?
>>>>
>>>>
>>>>
>>>>---------------------------------------------------------------------
>>>>To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>>>>For additional commands, e-mail: user-help@struts.apache.org
>>>>
>>>>
>>>>
>>>>
>>>>
>>>
>>>
>>>
>>>---------------------------------------------------------------------
>>>To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>>>For additional commands, e-mail: user-help@struts.apache.org
>>>
>>>
>>
>>
>>
> 
> --
> Frank W. Zammetti
> Founder and Chief Software Architect
> Omnytex Technologies
> http://www.omnytex.com
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
> 
> 
> 
> 

-- 
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


RE: Check Disk space before file upload

Posted by "David G. Friedman" <hu...@ix.netcom.com>.
Frank,

That's a very interesting bit of coding. :)

Regards,
David

-----Original Message-----
From: Frank W. Zammetti [mailto:fzlists@omnytex.com]
Sent: Wednesday, August 24, 2005 1:06 AM
To: Struts Users Mailing List
Subject: Re: Check Disk space before file upload


Hi Jack,

You can grab the latest version off the Bugzilla ticket:

http://issues.apache.org/bugzilla/show_bug.cgi?id=36325

It's one of those things that you'll look at the code and go "D'oh!
That's obvious as hell!", but amazingly I couldn't find anything similar
anywhere before I wrote it (there *must* be something, I just didn't
turn it up).

Frank

Dakota Jack wrote:
> Frank, could you shoot this code to me?  That sounds interesting as
> all get out!  Thanks ahead of time.
>
> On 8/23/05, Frank W. Zammetti <fz...@omnytex.com> wrote:
>
>>There's no easy cross-platform way to do this, believe it or not.  Seems
>>like it should be in the SDK, but it isn't.
>>
>>There is however some code I contributed to the Commons IO project that
>>does exactly this.  It is currently in SVN only, but I just submitted
>>some updates today that hopefully will allow it to be in the upcoming
>>1.1 (I believe) release).
>>
>>In the mean time, you can grab FileSystemUtils.java from SVN and give it
>>a shot.  It depends on one other class from IO (ByteArrayOutputStream I
>>think), but you can use the standard version instead, it will compile
>>fine against it (IIRC, this adds the possibility of some other
>>exceptions you'd have to potentially handle, but otherwise it works).
>>
>>Frank
>>
>>Anuradha S.Athreya wrote:
>>
>>>Hello,
>>>
>>>How can I check for disk space  on the server before uploading a file on
the
>>>server?
>>>
>>>
>>>
>>>---------------------------------------------------------------------
>>>To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>>>For additional commands, e-mail: user-help@struts.apache.org
>>>
>>>
>>>
>>>
>>>
>>
>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>>For additional commands, e-mail: user-help@struts.apache.org
>>
>>
>
>
>

--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Check Disk space before file upload

Posted by "Frank W. Zammetti" <fz...@omnytex.com>.
Hi Jack,

You can grab the latest version off the Bugzilla ticket:

http://issues.apache.org/bugzilla/show_bug.cgi?id=36325

It's one of those things that you'll look at the code and go "D'oh! 
That's obvious as hell!", but amazingly I couldn't find anything similar 
anywhere before I wrote it (there *must* be something, I just didn't 
turn it up).

Frank

Dakota Jack wrote:
> Frank, could you shoot this code to me?  That sounds interesting as
> all get out!  Thanks ahead of time.
> 
> On 8/23/05, Frank W. Zammetti <fz...@omnytex.com> wrote:
> 
>>There's no easy cross-platform way to do this, believe it or not.  Seems
>>like it should be in the SDK, but it isn't.
>>
>>There is however some code I contributed to the Commons IO project that
>>does exactly this.  It is currently in SVN only, but I just submitted
>>some updates today that hopefully will allow it to be in the upcoming
>>1.1 (I believe) release).
>>
>>In the mean time, you can grab FileSystemUtils.java from SVN and give it
>>a shot.  It depends on one other class from IO (ByteArrayOutputStream I
>>think), but you can use the standard version instead, it will compile
>>fine against it (IIRC, this adds the possibility of some other
>>exceptions you'd have to potentially handle, but otherwise it works).
>>
>>Frank
>>
>>Anuradha S.Athreya wrote:
>>
>>>Hello,
>>>
>>>How can I check for disk space  on the server before uploading a file on the
>>>server?
>>>
>>>
>>>
>>>---------------------------------------------------------------------
>>>To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>>>For additional commands, e-mail: user-help@struts.apache.org
>>>
>>>
>>>
>>>
>>>
>>
>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>>For additional commands, e-mail: user-help@struts.apache.org
>>
>>
> 
> 
> 

-- 
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Check Disk space before file upload

Posted by Dakota Jack <da...@gmail.com>.
Frank, could you shoot this code to me?  That sounds interesting as
all get out!  Thanks ahead of time.

On 8/23/05, Frank W. Zammetti <fz...@omnytex.com> wrote:
> There's no easy cross-platform way to do this, believe it or not.  Seems
> like it should be in the SDK, but it isn't.
> 
> There is however some code I contributed to the Commons IO project that
> does exactly this.  It is currently in SVN only, but I just submitted
> some updates today that hopefully will allow it to be in the upcoming
> 1.1 (I believe) release).
> 
> In the mean time, you can grab FileSystemUtils.java from SVN and give it
> a shot.  It depends on one other class from IO (ByteArrayOutputStream I
> think), but you can use the standard version instead, it will compile
> fine against it (IIRC, this adds the possibility of some other
> exceptions you'd have to potentially handle, but otherwise it works).
> 
> Frank
> 
> Anuradha S.Athreya wrote:
> > Hello,
> >
> > How can I check for disk space  on the server before uploading a file on the
> > server?
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > For additional commands, e-mail: user-help@struts.apache.org
> >
> >
> >
> >
> >
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
> 


-- 
"You can lead a horse to water but you cannot make it float on its back."
~Dakota Jack~

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Check Disk space before file upload

Posted by "Frank W. Zammetti" <fz...@omnytex.com>.
There's no easy cross-platform way to do this, believe it or not.  Seems 
like it should be in the SDK, but it isn't.

There is however some code I contributed to the Commons IO project that 
does exactly this.  It is currently in SVN only, but I just submitted 
some updates today that hopefully will allow it to be in the upcoming 
1.1 (I believe) release).

In the mean time, you can grab FileSystemUtils.java from SVN and give it 
a shot.  It depends on one other class from IO (ByteArrayOutputStream I 
think), but you can use the standard version instead, it will compile 
fine against it (IIRC, this adds the possibility of some other 
exceptions you'd have to potentially handle, but otherwise it works).

Frank

Anuradha S.Athreya wrote:
> Hello,
> 
> How can I check for disk space  on the server before uploading a file on the
> server?
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
> 
> 
> 
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org