commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "B. K. Oxley (binkley)" <bink...@alumni.rice.edu>
Subject Re: [vfs] proposal: FileUtils
Date Sun, 30 Jan 2005 22:37:58 GMT
How is this for an interface for file operations?

public interface FileOperation {
     void save(final InputStream newContents)
             throws FileSystemException;

     void saveAndBackup(final InputStream newContents)
             throws FileSystemException;

     void copyTo(final FileName newLocation)
             throws FileSystemException;

     void copyToAndOverwrite(final FileName newLocation)
             throws FileSystemException;

     void moveTo(final FileName newLocation)
             throws FileSystemException;

     void moveToAndOverwrite(final FileName newLocation)
             throws FileSystemException;
}

I think this covers 80%+ of use cases.  This is your classic 
cut/copy/paste operations with a file manager and the usual file-saving 
operation of an editor.


Cheers,
--binkley

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message