public static function write(string $path, string $contents, string $visibility = 'public', int $flags = LOCK_EX)
    {
        if (file_put_contents($path, $contents, $flags) === false) {
            return false;
        }

        Filesystem::setVisibility($path, $visibility);

        return true;
    }