| «« Pat Myself on the Feedback? | id3v2 throws UnsupportedOperationException »» |
|
About
I'm Ryan Lowe, a Software Engineering graduate living in Ottawa, Canada. I like agile software development and Ruby on Rails.
I write this blog in Canadian English and don't use a spell checker. Typos happen.
Projects
» Full-time Ruby on Rails freelancer
» Full-time with Rails since May 2005 » Former committer for RadRails (now Aptana) » I also have a few Rails side-projects in development: 1. wheretogoinTO.com Toronto nightlife 2. Hey Heads Up! TODO list and sharing 3. Layered Genealogy family history research 4. foos for foosball scoring 5. fanconcert for music fans (on hold) Hiring Rails developers? I can telecommute by the hour from Ottawa, Canada »» Email: rails AT ryanlowe DOT ca
BulletBlog
Now hosted on Hey! Heads Up -- check it out!
Syndication
Pings
Recent
Derek Lowe's (Ryan's older brother) words at Ryan's funeral
blog@ryanlowe.ca no more Forging Email Headers: Good, Bad or Ugly? Sarcastic Dictionary (Part 1 of Many) Tags Hierarchies Twisting Rails is Risky Business Risky Business? My Take on Early Alphas Whoa, it's August 2007 Closing Comments A Postscript to "Growth at the grassroots" »» All Blog Posts
Linkage
del.icio.us/ryanlowe
technorati/ryanlowe.ca/blog Aurora Roy Jim Andrew Trasker Travis Kibbee Karen Dr. Unk Ayana Van Bloggers Joel Spolsky Robert Scoble Tim Bray Dave Winer Raymond Chen James Robertson Ruby/Rails Bloggers rubyonrails.org weblog David Heinemeier Hansson Dave Thomas James Duncan Davidson Mike Clark Jamis Buck Signal vs. Noise Tobias Luetke Amy Hoy: (24)slash7 Jeremy Voorhis Eclipse Bloggers Planet Eclipse EclipseZone Luis de la Rosa Eclipse Foundation Kim Horne Billy Biggs Ian Skerrett Mike Milinkovich Bjorn Freeman-Benson Denis Roy
Archives
|
The Java Recycle Bin RFE I Sent to Sun
This is the submission text verbatim, except that the email addresses have been somewhat spam-protected, the long link at the bottom incorportated into the text and some formatting to clean it up a bit -- Ryan Update 6:39 AM Friday: here's a link to this RFE, though the email said that it may take a few days to show up. You also need a login to access the bug database. From: IncidentDaemonATsunDOTcom ************************************************ This review ID is NOT visible on the "Java Developer Connection" (JDC). We greatly appreciate your interest in improving the quality Please be aware that the large volume of reports we receive We currently have a three week response time for responding to If you just reported an issue that could have a major
A DESCRIPTION OF THE REQUEST : PLEASE NOTE: this problem is not specific to Windows. This RFE is to add a method to the Java spec, so that a cross-platform solution is available to Java developers. java.io.File lacks a method to send a file to the operating system's Recycle Bin or Trash Can. Since the "Recycle Bin" paradigm has been adopted by several major operating systems (Windows, Mac OS X and Linux) it would be great to have a method in the File class to do this. This RFE does not suggest changing the delete() method in any way. In RFE bug 4641147 that type of enhancement was suggested and I agree that will "break crossplatform compatibility". Instead this RFE suggests that a new method be made, named something like moveToRecycleBin() or moveToTrash() in java.io.File. This method would use OS-specific calls to send the file to the Recycle Bin so it can be restored/undeleted by the user. JUSTIFICATION : Many modern operating systems support the "Recycle Bin" paradigm. In order for Java to succeed on the desktop, J2SE developers need to have desktop-specific methods available to us. In desktop software, there is a need sometimes for a simulated "file browser" in a view where file operations take place like rename/move/open/delete. It's quite common to have this in a IDE. In these file browsers, user's expect the operations to act just like the native file browser available to them in the desktop environment. On Windows, for example, this is Windows Explorer. So in these file browsers when a user deletes a file, they expect it to show up in the Recycle Bin. This is typical for Windows applications like Visual Studio .NET 2003. EXPECTED VERSUS ACTUAL BEHAVIOR : EXPECTED - A call to moveToRecycleBin() or moveToTrash() would move the file from its current location to the operating system-specific Recycle Bin where it may be successfully recovered by the user. Like delete(), the method could return boolean indicating success or failure. On platforms where a move to Recycle Bin may not make sense (like on some Unix operating systems without a desktop environment or J2EE), then a simple call-through to delete() would suffice because that is the expected behaviour on a platform without a Recycle Bin. ACTUAL - Since there are operating system specific tasks that need to be done during the move to the Recycle Bin, this ability is currently not available to Java developers. It is not as simple as moving the file to the (hidden) Recycle Bin directory on Windows, for example. On Windows, the Win32 API shell function SHFileOperation() does a move to Recycle Bin. This would have to be called via JNI from Java. workaround: Last updated July 29, 2004 at 10:16 PM EST Comments
|