On 4/29/12, Juha Manninen <[email protected]> wrote:
Removing files in windows can fail also.
The flag RemoveReadOnlyFiles actually means try to also remove
read-only files (just like DeleteDirectory actually tries to delete a
directory).
As long as the function returns False if removing of a file/dir fails
it should be OK.
I would change the declaration to:
function DeleteDirectory(const DirectoryName: string;
OnlyChilds: boolean; const RemoveReadOnlyFiles: Boolean = False): boolean;
But that is possibly just a matter of taste.
One might also consider retuning the actual filename/foldername that
could not be removed if things fail, so feedback to the user can be
given.
Bart
--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus