Check if a content matches a file.
b = helptbx_iscontentupdte ( content , filename )
a 1-by-1 matrix of strings, the new content
a 1-by-1 matrix of strings, the file to be checked
a 1-by-1 matrix of booleans
Returns true if the filename is up-to-date, that is,
if the file does not require to be changed.
The file is to be updated if one of the following conditions is satisfied.
content.
The content comparison ignores the leading and trailing blanks.// Create a sample file. content = "Coucou!"; filename = fullfile(TMPDIR,"test.txt"); // See if the content is to be updated. b = helptbx_iscontentupdte ( content , filename ) expected = %f // Fill the file mputl ( content , filename ); // See if the file is to be updated. b = helptbx_iscontentupdte ( content , filename ) expected = %t // Change the content content = "Hello!" b = helptbx_iscontentupdte ( content , filename ) expected = %f // Delete the file mdelete(filename); | ![]() | ![]() |