<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def update_file(finfo, sample_info, config, pass_uptodate=False):
 """Update the file in local filesystem storage. """

    storage_dir = utils.safe_makedir(_get_storage_dir(finfo, config))
    if finfo.get("type") == "directory":
        return _copy_finfo_directory(finfo, storage_dir)
    else:
        return _copy_finfo(finfo, storage_dir, pass_uptodate=pass_uptodate)