A hardcoded file path is a guarantee that eventually the program will fail. It may happen because the paths on the target machine changed or because the application was deployed on an OS other than the one on which it was developed. After all, not every OS has a "C:" drive, just has not every OS has a "/home" directory.
This rule checks for hardcoded, absolute paths in ``++Files++`` and all types of input and output streams.
== Noncompliant Code Example
----
public void readProperties() {
File in = new File("C:/myappdir/app.properties"); // Noncompliant