[Lazarus] FileUtils.DeleteDirectory help

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[Lazarus] FileUtils.DeleteDirectory help

Free Pascal - Lazarus mailing list
Pls add a comment to FileUtil.DeleteDirectoty() about 2nd parameter
OnlyChildren.
my guesses were:
- delete only subitems of dir, of one level, but don't delete dir
- delete only subitems, of ALL levels, but leave source dir
- delete ALSO subitems of ALL levels

I still cannot guess it.

--
Regards,
Alexey

--
_______________________________________________
Lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] FileUtils.DeleteDirectory help

Free Pascal - Lazarus mailing list
On 07/21/2018 07:28 AM, AlexeyT via Lazarus wrote:
> Pls add a comment to FileUtil.DeleteDirectoty() about 2nd parameter OnlyChildren.
> my guesses were:
> - delete only subitems of dir, of one level, but don't delete dir
> - delete only subitems, of ALL levels, but leave source dir
> - delete ALSO subitems of ALL levels
>
> I still cannot guess it.


even after testing on a disposable tree with structure

   /foo1/
   /foo1/bar1.txt
   /foo1/foo2/
   /foo1/foo2/bar2.txt
   /foo1/foo2/foo3/
   /foo1/foo2/foo3/bar3.txt

??


--
  NOTE: No off-list assistance is given without prior approval.
        *Please keep mailing list traffic on the list unless*
        *a signed and pre-paid contract is in effect with us.*
--
_______________________________________________
Lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus