Asserts that two files are the same and returns delta using
    -, ?, + format if not

    Args:
        path1 (str): Path to first file
        path2 (str): Path to second file

    Returns:
        None
348450
def assert_files_same(path1, path2):
    # type: (str, str) -> None
    
    difflines = compare_files(path1, path2)
    assert len(difflines) == 0, ''.join(['\n'] + difflines)
1036702
def check_file_paths(self, *args):
        
        for path in enumerate(args):
            path = path[1]
            if path is not None:
                try:
                    self.check_file_path(path)
                except OSError as ex:
                    logger.warn(ex)
                    raise
        return args
311855
def is_same_file (filename1, filename2):
    
    if filename1 == filename2:
        return True
    if os.name == 'posix':
        return os.path.samefile(filename1, filename2)
    return is_same_filename(filename1, filename2)
956656
public boolean isSubDirectory(File file1, File file2) {
        try {
            return (file1.getCanonicalPath()+File.separator).startsWith(file2.getCanonicalPath()+File.separator);
        } catch (IOException e) {
            e.printStackTrace();
            return false;
        }
    }
1030530
def join_paths(path1: Optional[str], path2: Optional[str]) -> Optional[str]:
    
    if path1 is not None and path2 is not None:
        return os.path.join(path1, path2)
988064
@Override
    public boolean isSameFile(final Path path1, final Path path2) throws IOException {

        // Only equal if pointing to same FS
        final FileSystem fs1 = path1.getFileSystem();
        final FileSystem fs2 = path2.getFileSystem();
        if (fs1 != fs2) {
            return false;
        }

        // Same if the normalized form points to the same location
        final String normalized1 = path1.normalize().toString();
        final String normalized2 = path2.normalize().toString();
        return normalized1.equals(normalized2);
    }
15462
def samefile(a: str, b: str) -> bool:
    """"""
    try:
        return os.path.samefile(a, b)
    except OSError:
        return os.path.normpath(a) == os.path.normpath(b)
194963
public static boolean entryEquals(File f1, File f2, String path) {
    return entryEquals(f1, f2, path, path);
  }
322872
def check_if_vislcg_is_in_path( self, vislcg_cmd1 ):
        ''' 
        '''
        for path in os.environ["PATH"].split( os.pathsep ):
            path1 = path.strip('"')
            file1 = os.path.join(path1, vislcg_cmd1)
            if os.path.isfile(file1) or os.path.isfile(file1+'.exe'):
               return True
        return False
138871
def compare_files(pyc_filename1, pyc_filename2, verify):
    """"""
    (version1, timestamp, magic_int1, code_obj1, is_pypy,
     source_size) = uncompyle6.load_module(pyc_filename1)
    (version2, timestamp, magic_int2, code_obj2, is_pypy,
        source_size) = uncompyle6.load_module(pyc_filename2)
    if (magic_int1 != magic_int2) and verify == 'verify':
         verify = 'weak_verify'
    cmp_code_objects(version1, is_pypy, code_obj1, code_obj2, verify)
240876
def equal(self, path_a, path_b):
        
        content_a, _ = self.get_bytes(path_a)
        content_b, _ = self.get_bytes(path_b)

        return content_a == content_b
51814
public boolean isSameFile(JimfsPath path, FileSystemView view2, JimfsPath path2)
      throws IOException {
    if (!isSameFileSystem(view2)) {
      return false;
    }

    store.readLock().lock();
    try {
      File file = lookUp(path, Options.FOLLOW_LINKS).fileOrNull();
      File file2 = view2.lookUp(path2, Options.FOLLOW_LINKS).fileOrNull();
      return file != null && Objects.equals(file, file2);
    } finally {
      store.readLock().unlock();
    }
  }
557850
def assertNotEqual(first, second, message=None):
    
    if not first != second:
        raise TestStepFail(
            format_message(message) if message is not None else "Assert: %s == %s" % (str(first),
                                                                                      str(second)))
660207
def check_parameter_similarity(files_dict):
    
    try:
        parameter_names = files_dict.itervalues().next().keys()  # get the parameter names of the first file, to check if these are the same in the other files
    except AttributeError:  # if there is no parameter at all
        if any(i is not None for i in files_dict.itervalues()):  # check if there is also no parameter for the other files
            return False
        else:
            return True
    if any(parameter_names != i.keys() for i in files_dict.itervalues()):
        return False
    return True
1150466
def is_same_filename (filename1, filename2):
    """"""
    return os.path.realpath(filename1) == os.path.realpath(filename2)
78602
def check_no_overlapping_paths(paths):
  """"""
  for path in paths:
    list_copy_without_path = list(paths)
    list_copy_without_path.remove(path)
    if path in list_copy_without_path:
      raise ValueError('{} appeared more than once. All paths must be unique.'.format(path))
    for p in list_copy_without_path:
      if path in p:
        raise ValueError('{} and {} have the same prefix. All paths must be unique and cannot overlap.'.format(path, p))
1163718
public static String pathLinker(String path1,String path2){
        if ((path1 == null || path1.equals("")) && (path2 == null || path2.equals(""))){
            return null;
        }

        if (path1 == null || path1.equals("")){
            return path2;
        }

        if (path2 == null || path2.equals("")){
            return path1;
        }

        if (path1.endsWith(File.separator)){
            path1 = path1.substring(0,path1.length() - 1);
        }

        if (path2.startsWith(File.separator)){
            path2 = path2.substring(1,path2.length());
        }

        if (path2.endsWith(File.separator)){
            path2 = path2.substring(0,path2.length() - 1);
        }

        return path1 + File.separator + path2;
    }