<< helptbx_helpupdate helptbx helptbx_updtifneeded >>

helptbx >> helptbx > helptbx_iscontentupdte

helptbx_iscontentupdte

Check if a content matches a file.

Calling Sequence

b = helptbx_iscontentupdte ( content , filename )

Parameters

content :

a 1-by-1 matrix of strings, the new content

filename :

a 1-by-1 matrix of strings, the file to be checked

b :

a 1-by-1 matrix of booleans

Description

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.

Examples

// 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);

Authors


Report an issue
<< helptbx_helpupdate helptbx helptbx_updtifneeded >>