content
Return file content if input is a valid file path, otherwise return
null
.
content(string $path);
content(string $path, string $content = null);
Example:
if (null !== content('.\path\to\file.txt')) { … }
if (content('.\path\to\file.txt', 'Yo!')) {
// File created!
} else {
// Error!
}