src/GameOfLife/Utils/FileSystem/FileSystemHandler.php
/**
     * Converts the slashes to backslashes (Windows) or the backslashes to slashes (Linux).
     *
     * @param String $_path The path with mixed slashes and backslashes
     *
     * @return String The path with either only slashes or only backslashes
     */
Converts the slashes to backslashes (Windows) or the backslashes to slashes (Linux).
@param String $_path The path with mixed slashes and backslashes

@return String The path with either only slashes or only backslashes
Converts the slashes to backslashes ( Windows ) or the backslashes to slashes ( Linux ) . @param String $_path The path with mixed slashes and backslashes @return String The path with either only slashes or only backslashes
protected function convertSlashes(String $_path): String
    {
        if (stristr(PHP_OS, "win")) return str_replace("/", "\\", $_path);
        elseif (stristr(PHP_OS, "linux")) return str_replace("\\", "/", $_path);
        else return $_path;
    }
protected function convertSlashes ( String $ _path ) : String { if ( stristr ( PHP_OS , " win " ) ) return str_replace ( " / " , " \\ " , $ _path ) ; elseif ( stristr ( PHP_OS , " linux " ) ) return str_replace ( " \\ " , " / " , $ _path ) ; else return $ _path ; }
Converts the slashes to backslashes (Windows) or the backslashes to slashes (Linux).
Converts the slashes to backslashes ( Windows ) or the backslashes to slashes ( Linux ) .