Closed GoogleCodeExporter closed 9 years ago
The Gadget should use the System.Shell.RecycleBin object to handle the special
case
of recycler folders. There appears to be sufficient information to do this
quickly
and easily, without needing to traverse any of the actual files in the bin
(accessible properties include size as well as file count). API documentation
can be
found here:
https://msdn2.microsoft.com/en-us/library/ms723187.aspx
Original comment by andrew.h...@gmail.com
on 15 Jun 2007 at 10:36
Researching this has proven problematic. It is apparently not possible at the
moment
to retrieve the path to the Recycle Bin using the javascript language bindings;
any
attempt to do so throws "Object error" at runtime. Other well-known locations
are
amenable to System.Shell.knownFolder and System.Shell.knownFolderPath.
In the absence of knowing on which drive the recycle bin lives and where, it
seems
difficult to accurately solve this problem; it is ambiguous what happens when
there
are multiple drives (since System.Shell.RecycleBin is a singleton), and I can't
seem
to traverse the recycle bin itself. This bug may persist for a bit, until I
find (or
someone can suggest) a good workaround.
Original comment by andrew.h...@gmail.com
on 15 Jun 2007 at 9:30
After a few days of research, it appears this problem is currently intractable
in
Javascript. As a workaround, added a note to the details flyout stating that
files
and folders in the recycle bin are not included in analysis.
Mitigated in revision 86.
Original comment by andrew.h...@gmail.com
on 19 Jun 2007 at 12:41
Original comment by andrew.h...@gmail.com
on 19 Jun 2007 at 1:02
Original comment by andrew.h...@gmail.com
on 19 Jun 2007 at 2:18
There are a few other approaches that might give you some joy (if only as a
substitute to the broken functionality you've already beaten on):
- system.environment.getfolderpath()
- p/invoke to Shell32's GetFolder() API using the constant
FOLDERID_RecycleBinFolder
(http://msdn2.microsoft.com/en-us/library/ms645244.aspx)
- [I believe there's some method as part of the system.management namespace as
well
that can retrieve 'special folders', but I can't find it]
As a last resort, you could try a p/invoke to SHGetFolderPath and leverage the
CSIDL
constant CSIDL_BITBUCKET
(http://msdn2.microsoft.com/en-us/library/ms649274.aspx)
Original comment by mikesmit...@gmail.com
on 28 Jun 2007 at 5:14
Mike,
Thanks for the links. I've added this info to Issue #5, which is still open to
track
this.
Original comment by andrew.h...@gmail.com
on 28 Jun 2007 at 12:09
Original issue reported on code.google.com by
andrew.h...@gmail.com
on 15 Jun 2007 at 10:31