code: protected String sha1( File file ) {
          try {
              if (contentBasedSha1()) {
                  byte[] hash = SecureHash.getHash(SecureHash.Algorithm.SHA_1, file);
                  return StringUtil.getHexString(hash);
              }
              return SecureHash.sha1(createUrlForFile(file).toString());
          } catch (Exception e) {
              throw new ConnectorException(e);
          }
      }
docs: Computes the SHA1 for the given file. By default, this method will look at the
  {@link FileSystemConnector#contentBasedSha1()} flag and either take the URL of the file (using @see
  java.util.File#toURI().toURL() and return the SHA1 of the URL string or return the SHA1 of the entire file content.
  
  @param file a {@link File} instance; never null
  @return the SHA1 of the file.