add to your .pro:
LIBS += -lefsrv -lbafl
inlude:
#include <e32base.h>
#include <bautils.h>
#include <f32file.h>
the method to set a file read only:
RFs fsSession;
CleanupClosePushL(fsSession);
User::LeaveIfError( fsSession.Connect() );
fsSession.SetAtt((_L("path")),KEntryAttReadOnly,KEntryAttHidden);
CleanupStack::PopAndDestroy(&fsSession);
for your path set e.g.: C:\\system\\data\\whatsapp_notifier.rsc
to set no attributes:
RFs fsSession;
CleanupClosePushL(fsSession);
User::LeaveIfError( fsSession.Connect() );
fsSession.SetAtt((_L("path")),KEntryAttNormal,KEntryAttReadOnly | KEntryAttSystem);
CleanupStack::PopAndDestroy(&fsSession);
should also work with folders