| Crates.io | wincent |
| lib.rs | wincent |
| version | 0.1.2 |
| created_at | 2024-10-29 13:43:51.776203+00 |
| updated_at | 2025-04-12 07:16:55.803136+00 |
| description | A library for handling windows quick access |
| homepage | |
| repository | https://github.com/Hellager/wincent-rs |
| max_upload_size | |
| id | 1427021 |
| size | 180,118 |
Read this in other languages: English | δΈζ
Wincent is a Rust library for managing Windows Quick Access functionality, providing comprehensive control over recent files and frequent folders with async support and robust error handling.
π Comprehensive Quick Access Management
π‘οΈ Robust Operation Handling
β‘ Performance Optimizations
Add the following to your Cargo.toml:
[dependencies]
wincent = "0.1.2"
use wincent::predule::*;
#[tokio::main]
async fn main() -> WincentResult<()> {
// Initialize manager
let manager = QuickAccessManager::new().await?;
// Add file to Recent Files with force update
manager.add_item(
"C:\\path\\to\\file.txt",
QuickAccess::RecentFiles,
true
).await?;
// Query all items
let items = manager.get_items(QuickAccess::All).await?;
println!("Quick Access items: {:?}", items);
Ok(())
}
use wincent::predule::*;
#[tokio::main]
async fn main() -> WincentResult<()> {
let manager = QuickAccessManager::new().await?;
// Clear recent files with force refresh
manager.empty_items(
QuickAccess::RecentFiles,
true, // force refresh
false // preserve system defaults
).await?;
Ok(())
}
force_update when adding recent files for immediate visibilityalso_system_default carefully when clearing itemsAPI Dependencies: The library relies on Windows system APIs for its core functionality. Due to Windows security policies and updates, certain operations may require elevated permissions or could be restricted.
Environment Compatibility: Different Windows environments (including versions, configurations, and installed software) may affect the library's functionality. In particular:
Pre-flight Checks: Before performing operations, especially for folder management, it's recommended to use the built-in feasibility checks:
let (can_query, can_modify) = manager.check_feasible().await;
if !can_modify {
println!("Warning: System environment may restrict modification operations");
}
These limitations are inherent to Windows Quick Access functionality and not specific to this library. We provide comprehensive error handling and status checking mechanisms to help you handle these scenarios gracefully.
The library uses Rust's Result type for comprehensive error management, allowing precise handling of potential issues during quick access manipulation.
git checkout -b wincent/amazing-feature)git commit -m 'feat: Add some amazing feature')git push origin wincent/amazing-feature)# Clone the repository
git clone https://github.com/Hellager/wincent-rs.git
cd wincent-rs
# Install development dependencies
cargo build
cargo test
This library interacts with system-level Quick Access functionality. Always ensure you have appropriate permissions and create backups before making significant changes.
If you encounter any issues or have questions, please file an issue on our GitHub repository.
Distributed under the MIT License. See LICENSE for more information.
Developed with π¦ by @Hellager