Do not write to the SharePoint file system |
Do not create directories or write to files in the SharePoint file system. If this is necessary (e.g. in TimerJobs) ensure that no SharePoint system files are overwritten, that the file size is limited and will not exceed uncontrolled and ensure, that these files are deleted during deinstallation of your code.
CheckId | SPC030207 |
---|---|
TypeName | DoNotWriteToFileSystem |
Severity | Error |
Type | Assembly |
Remove the instruction which writes to the file system. Note: In some cases it may be appropriate to write to the TEMP directory but the rule cannot evaluate the used path for the file operation. In this case please review the code and suppress this rule if needed.
To suppress this violation in managed code add the following attribute to the method which contains the instruction (available since SPCAF version v5.2). Learn more about SuppressMessage here.
[SuppressMessage("SPCAF.Rules.SupportabilityGroup", "SPC030207:DoNotWriteToFileSystem", Justification = "Provide reason for suppression here")]