there is nothing to remove those flags:
if cmd = 'hide' then
include(f.flags, FA_HIDDEN);
if cmd = 'hide tree' then
include(f.flags, FA_HIDDENTREE);
if cmd = 'no log' then
include(f.flags, FA_DONT_LOG);
if cmd = 'not as download' then
if f.isFile() then include(f.flags, FA_DONT_COUNT_AS_DL)
and with the last 'if' when 'not f.isfile' , has a link a download mask?
else f.dontCountAsDownloadMask:=first(par(2), '*'); if cmd = 'hide' then
include(f.flags, FA_HIDDEN);
if cmd = 'hide tree' and f.isfolder() then
include(f.flags, FA_HIDDENTREE);
if cmd = 'no log' then
include(f.flags, FA_DONT_LOG);
if cmd = 'not as download' then
if not f.isFolder() then include(f.flags, FA_DONT_COUNT_AS_DL)
why not have the possibility to use all commands in a one line?
cmd:=par(1);{.set item|%item%|hide=[0,1]|hide tree=[0,1]|no log=[0,1]|not as download=[0,1,mask]|access=liste|delete=liste|upload=liste| ..... .}
0= reset flag , 1= set flag
not as download=[0,1,mask]
0=remove this flag (files) or reset the download mask (folders)
1=set this flag (files)
mask= set the download mask (folders)
one way for the three first flags?
try if isTrue(parEx('hide')) then include(f.flags, FA_HIDDEN)
else exclude(f.flags, FA_HIDDEN);
except end;
if f.isfolder then
try if isTrue(parEx('hide tree')) then include(f.flags, FA_HIDDENTREE)
else exclude(f.flags, FA_HIDDENTREE);
except end;
try if isTrue(parEx('no log')) then include(f.flags, FA_DONT_LOG)
else exclude(f.flags, FA_DONT_LOG);
except end;