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
File/Folder deleting, Recycle Bin and Read only files [message #24203] Tue, 05 January 2010 10:02 Go to previous message
koldo is currently offline  koldo
Messages: 3361
Registered: August 2008
Senior Veteran
Hello all

Presently we have this basic functions to delete files and folders:
bool FileDelete(const char *filename)
bool DirectoryDelete(const char *dirname)

They delete forever a file/folder if it is not read-only (and of course if it is available).

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

Some possible options would be:

1.- To add to this functions new parameters. For example:
bool FileDelete(const char *filename, bool recycleBin = false, bool delReadOnly = false)
bool DirectoryDelete(const char *dirname, bool recycleBin = false, bool delReadOnly = false)

or
enum DeleteFlags {DEL_FOREVER = 0, DEL_RECYCLE = 1, NOT_DEL_READONLY = 0, DEL_READONLY = 2}; 
bool FileDelete(const char *filename, int flags = 0)
bool DirectoryDelete(const char *dirname, int flags = 0)


2.- To add functions to handle this:
void SetDeleteToRecycleBin(bool val = false);
void SetDeleteReadOnly(bool val = false);

or
enum DeleteFlags {DEL_FOREVER = 0, DEL_RECYCLE = 1, NOT_DEL_READONLY = 0, DEL_READONLY = 2}; 
void SetDeleteFlags(bool val = false);


What do you think about it ?

Best regards
Koldo


Best regards
IƱaki
 
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: Mon May 13 03:23:53 CEST 2024

Total time taken to generate the page: 0.02553 seconds