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   |
|
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 )
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
|
|
|
 |
|
File/Folder deleting, Recycle Bin and Read only files
By: koldo on Tue, 05 January 2010 10:02
|
 |
|
Re: File/Folder deleting, Recycle Bin and Read only files
|
 |
|
Re: File/Folder deleting, Recycle Bin and Read only files
By: koldo on Tue, 05 January 2010 15:11
|
 |
|
Re: File/Folder deleting, Recycle Bin and Read only files
By: mirek on Wed, 06 January 2010 07:49
|
 |
|
Re: File/Folder deleting, Recycle Bin and Read only files
By: koldo on Wed, 06 January 2010 11:51
|
 |
|
Re: File/Folder deleting, Recycle Bin and Read only files
By: mirek on Wed, 06 January 2010 21:59
|
 |
|
Re: File/Folder deleting, Recycle Bin and Read only files
By: koldo on Wed, 06 January 2010 23:10
|
Goto Forum:
Current Time: Wed Apr 30 13:26:01 CEST 2025
Total time taken to generate the page: 0.00802 seconds
|