from trashcli.trash import *
from trashcli.filesystem import *
trashcan = GlobalTrashCan()
try:
f = Path("path/to/delete")
trashed_file = trashcan.trash(f)
except OSError, e:
# handle error here
except IOError, e:
# handle error here
Sunday, September 13, 2009
Trash support in LXDE through trash-cli
According to this article the LXDE Desktop Enviroment got Trash support thanks the integration of the trash-cli libraries. You can do the same with the following the code:
Subscribe to:
Post Comments (Atom)

No comments:
Post a Comment