TopShelfCustomer/TopShelfCustomer/Services/SerializationHelper.cs
/// <summary>
/// JsonFileExists:
///
/// Simple method for checking if there is a JSON file with
/// the argument's name. Returns true if a file is found by that name,
/// and false otherwise.
/// </summary>
/// <param name="filename"> the name of the json file to find (without the extension)</param>
/// <returns> true if a file is found, false otherwise </returns>


Simple method for checking if there is a JSON file with
the argument's name. Returns true if a file is found by that name,
and false otherwise.
Simple method for checking if there is a JSON file with the argument ' s name . Returns true if a file is found by that name and false otherwise .
public static bool JsonFileExists ( string filename ) {
            var filepath = Path.Combine( FolderPath, filename + FileExtension );        
            if ( !File.Exists( filepath ) ) {       
                return false;       
            }
            return true;        
        }
public static bool JsonFileExists ( string filename ) { var filepath = Path . Combine ( FolderPath , filename + FileExtension ) ; if ( ! File . Exists ( filepath ) ) { return false ; } return true ; }
JsonFileExists:
JsonFileExists :
//Create the file path //Check if file exists //File not found //File found
true if a file is found, false otherwise
true if a file is found false otherwise
filename
string
the name of the json file to find (without the extension)
the name of the json file to find ( without the extension )