Thread overview
rmdirRecurse - on NFS file system
Feb 12
Vino
Feb 13
Vino
Feb 13
Seb
Feb 14
Vino
February 12
Hi All,

   Request your help, the below code works find on normal File system, bu if the file system is a NFS file system the below code, is not working

if Step = dryrun( Display Only) : Works for both NFS and normal file system.
if Step = run (Delete folder) : Does not work on NFS file system but works on normal file system.
No error message.

auto coAgedDirClean (string FFs, string Step, int AgeSize) {
auto cAges = AgeSize
auto dFiles = Array!(Tuple!(string, SysTime))(dirEntries(FFs, SpanMode.shallow).filter!(a => a.isDir && !globMatch(a.baseName, "*DND*") && a.timeCreated < cAges).map!(a => tuple(a.name, a.timeCreated)));
if (Step == "run") { dFiles.each!(f => f[0].rmdirRecurse); } return dFiles;
}

From,
Vino.B
February 13
On Monday, 12 February 2018 at 06:52:25 UTC, Vino wrote:
> Hi All,
>
>    Request your help, the below code works find on normal File system, bu if the file system is a NFS file system the below code, is not working
>
> if Step = dryrun( Display Only) : Works for both NFS and normal file system.
> if Step = run (Delete folder) : Does not work on NFS file system but works on normal file system.
> No error message.
>
> auto coAgedDirClean (string FFs, string Step, int AgeSize) {
> auto cAges = AgeSize
> auto dFiles = Array!(Tuple!(string, SysTime))(dirEntries(FFs, SpanMode.shallow).filter!(a => a.isDir && !globMatch(a.baseName, "*DND*") && a.timeCreated < cAges).map!(a => tuple(a.name, a.timeCreated)));
> if (Step == "run") { dFiles.each!(f => f[0].rmdirRecurse); } return dFiles;
> }
>
> From,
> Vino.B

Hi All,

Was able to resolve this issue.

February 13
On Tuesday, 13 February 2018 at 16:58:09 UTC, Vino wrote:
> On Monday, 12 February 2018 at 06:52:25 UTC, Vino wrote:
>> [...]
>
> Hi All,
>
> Was able to resolve this issue.

That's great!

BTW I think it would be helpful for future reader who find this thread to know how you resolved your problem.
February 14
On Tuesday, 13 February 2018 at 17:01:06 UTC, Seb wrote:
> On Tuesday, 13 February 2018 at 16:58:09 UTC, Vino wrote:
>> On Monday, 12 February 2018 at 06:52:25 UTC, Vino wrote:
>>> [...]
>>
>> Hi All,
>>
>> Was able to resolve this issue.
>
> That's great!
>
> BTW I think it would be helpful for future reader who find this thread to know how you resolved your problem.

Hi All,

I just modified the below lines of the code,

if (Step == "run" && !dFiles.empty) { dFiles.each!(f => rmdirRecurse(f[0])); } return dFiles;


From,
Vino.B