commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gary Gregory <>
Subject RE: [IO] Progress Monitor
Date Thu, 08 Apr 2010 17:33:36 GMT
> -----Original Message-----
> From: Rafał Krupiński []
> Sent: Thursday, April 08, 2010 04:03
> To: Commons Developers List
> Subject: Re: [IO] Progress Monitor
> On Wed, Apr 7, 2010 at 12:09 AM, Gary Gregory
> <> wrote:
> [..]
> > When I am copying a directory containing possibly hundreds of files, I do
> want to know how far along I am. Recall that File
> >objects describe both files and directories.
> Good point.
> > The progress monitor itself can decide if the operation is fast enough to
> not bother with providing actual progress feedback. For example, Eclipse does
> not bring up the progress dialog if an operation is fast enough. This is a
> subtlety left to progress monitor implementations though.
> Yes, but in Eclipse the decision is based on a timer and it doesn't
> need support from a ProgressMonitor interface or the monitored
> service.
> What level of details would copy(File,File) provide when copying a
> deep directory structure? What performance penalty would it cause.
> What about users who don't need progress monitoring?

I would expect at least file and directory names to be passed to the progress monitor. For
files above a certain size, above the internal copy buffer size for example, I would expect
the PM to be called with "i of n K" type of messages. The idea is to be able provide data
for the same kind of feedback you see in Eclipse or in the Windows explorer UI when copying
files. I do not see any performance overhead beyond the method call to the PM and what the
PM decides to do obviously. The File object are already constructed and the file name and
file sizes are known. The URLs the length is not know but you know how far you've gone so


> --
> Pozdrawiam / Best Regards
> Rafal Krupinski
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

View raw message