-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a94b4ce
commit 4c1ece3
Showing
5 changed files
with
39 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
|
||
# Unreleased | ||
|
||
## Changed | ||
- The "Linux" implementation was replaced by a custom Freedesktop implementation. | ||
|
||
## Added | ||
- `list`, `purge_all`, and `restore_all` to Windows and Freedesktop |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
use std::fs::File; | ||
use trash; | ||
|
||
fn main() { | ||
// Let's create and remove a single file | ||
File::create("remove-me").unwrap(); | ||
trash::delete("remove-me").unwrap(); | ||
assert!(File::open("remove-me").is_err()); | ||
|
||
// Now let's remove multiple files at once | ||
let the_others = ["remove-me-too", "dont-forget-about-me-either"]; | ||
for name in the_others.iter() { | ||
File::create(name).unwrap(); | ||
} | ||
trash::delete_all(&the_others).unwrap(); | ||
for name in the_others.iter() { | ||
assert!(File::open(name).is_err()); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters