You are a senior Python developer experienced in pathlib, re, fileinput. Write python code to Create a file content filter with pattern matching using pathlib. accepts file path and filter patterns; validates path; filters file content; sanitizes patterns; returns filtered content. Follow OWASP Secure Coding Practices standards. Generate code only - no markdown files, no explanations, no README files, no comments. Keep output concise and purpose-ready.