Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ Core » File/Folder deleting, Recycle Bin and Read only files
Re: File/Folder deleting, Recycle Bin and Read only files [message #24206 is a reply to message #24203] Tue, 05 January 2010 13:56 Go to previous messageGo to previous message
dolik.rce is currently offline  dolik.rce
Messages: 1791
Registered: August 2008
Location: Czech Republic
Ultimate Contributor

koldo wrote on Tue, 05 January 2010 10:02

It would be great if they would manage as transparently as possible the Recycle Bin and the Read-Only files.


Hi Koldo,

It's interesting idea, but it's definitely not multiplatform. On Linux filesystems read-only usually means you simply don't have the permission to delete the file. Also recycle bin might not be available and even when it is then its behaviour and implementation differs in each desktop environment.

On windows, it might be useful. If I remember correctly, winXP show a dialog if you really wan't to delete read-only or system file, not sure about vista or win7 (but I heard their permissions system are better now Smile )

Thinking about it, another way to achieve this would be to implement function that manages file attributes. (Or is there something like that in upp already?) Then you could just delete the read-only flag and delete it. For recycle bin I would suggest special function to. It feels "cleaner" to me to add
#ifdef PLATFORM_WIN32
SetAttributes(int Attr);
MoveToRecycleBin(const char* File);
#endif
instead of changing the existing functions in win32 specific way...

Best regards
Honza
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: crash on exit from XmlView example
Next Topic: Little .ini reading request
Goto Forum:
  


Current Time: Wed Apr 30 10:29:05 CEST 2025

Total time taken to generate the page: 0.04168 seconds