Checks an object hash to see if it contains a File object, or, if legacy is true, checks to
see if an object hash contains an <input type="file" /> element.
760056
function(data) {
    for (var n in data) {
      if (data[n] instanceof Blob) {
        return true;
      }
      if ((angular.isObject(data[n]) || angular.isArray(data[n])) && hasFile(data[n])) {
        return true;
      }
    }
    return false;
  }
1039134
def check_file?(file)
      return true if @everything
      type = mime_type_for_file(file)
      ! ignore_types.any? { |ignored| type.include?(ignored) }
    end
43424
def is_hash_in_index(self, filehash):
        
        filehash = (u"%X" % filehash)
        results = self.__searcher.search(
            whoosh.query.Term('docfilehash', filehash))
        return bool(results)
892850
def is_contains(self, data):
        
        if not data:
            return False
        data = self._compress_by_md5(data)
        result = True
        # cut the first two place,route to different block by block_num
        name = self.key + str(int(data[0:2], 16) % self.block_num)
        for h in self.hash_function:
            local_hash = h.hash(data)
            result = result & self.server.getbit(name, local_hash)
        return result
896550
def has_hash_of(self, destpath, code, package):
        """"""
        if destpath is not None and os.path.isfile(destpath):
            with openfile(destpath, "r") as opened:
                compiled = readfile(opened)
            hashash = gethash(compiled)
            if hashash is not None and hashash == self.comp.genhash(package, code):
                return compiled
        return None
920098
function checkType(obj, keyName) {
  return obj && typeof obj === 'object' && Object.keys(obj).length === 1 &&
    obj.hasOwnProperty(keyName);
}
1170578
function isJsonFile (file) {
  return file.data &&                             // The file has data
    (typeof file.data === 'string') &&            // and it's a string
    (
      mimeTypePattern.test(file.mimeType) ||      // and it has a JSON MIME type
      extensionPattern.test(file.url)             // or at least a .json file extension
    );
}
357846
private boolean isFileType(WatchEvent event, String fileType) {
        return event.context().toString().contains(fileType);
    }
1089543
def is_binary_file(file_obj):
    
    start = file_obj.tell()
    fbytes = file_obj.read(1024)
    file_obj.seek(start)
    is_str = isinstance(fbytes, str)
    for fbyte in fbytes:
        if is_str:
            code = ord(fbyte)
        else:
            code = fbyte
        if code > 127:
            return True
    return False
237081
@SuppressWarnings("unchecked")
  public boolean contains(final Object key) {
    // validate key
    if (key == null) {
      throw new IllegalArgumentException("Null element is not supported.");
    }
    // find element
    final int hashCode = ((T)key).hashCode();
    final int index = getIndex(hashCode);
    return containsElem(index, (T) key, hashCode);
  }
834612
function(key) {
      var value = this.attributes[key];
      if (_.isObject(value) &&
          !(value instanceof Parse.Object) &&
          !(value instanceof Parse.File)) {
        value = value.toJSON ? value.toJSON() : value;
        var json = JSON.stringify(value);
        if (this._hashedJSON[key] !== json) {
          this._hashedJSON[key] = json;
          return true;
        }
      }
      return false;
    }
1216122
function isSameFile (newFilePath, oldFilePath) {
  const newFileContent = fs.readFileSync(newFilePath, { encoding: 'utf-8' })
  const oldFileContent = fs.readFileSync(oldFilePath, { encoding: 'utf-8' })
  const newHash = md5(newFileContent)
  const oldHash = md5(oldFileContent)

  return newHash === oldHash
}
113065
function checkObj(instance,objTypeDef,path,additionalProp){

         if(typeof objTypeDef =='object'){
             if(typeof instance != 'object' || instance instanceof Array){
                 errors.push({property:path,message:"an object is required"});
             }

             for(var i in objTypeDef){
                 if(objTypeDef.hasOwnProperty(i)){
                     var value = instance[i];
                     // skip _not_ specified properties
                     if (value === undefined && options.existingOnly) continue;
                     var propDef = objTypeDef[i];
                     // set default
                     if(value === undefined && propDef["default"]){
                         value = instance[i] = propDef["default"];
                     }
                     if(options.coerce && i in instance){
                         value = instance[i] = options.coerce(value, propDef);
                     }
                     checkProp(value,propDef,path,i);
                 }
             }
         }
         for(i in instance){
             if(instance.hasOwnProperty(i) && !(i.charAt(0) == '_' && i.charAt(1) == '_')
                 && objTypeDef && !objTypeDef[i] && additionalProp===false){
                 if (options.filter) {
                     delete instance[i];
                     continue;
                 } else {
                     errors.push({property:path,message:(typeof value) + "The property " + i +
                         " is not defined in the schema and the schema does not allow additional properties"});
                 }
             }
             var requires = objTypeDef && objTypeDef[i] && objTypeDef[i].requires;
             if(requires && !(requires in instance)){
                 errors.push({property:path,message:"the presence of the property " + i + " requires that " +
                   requires + " also be present"});
             }
             value = instance[i];
             if(additionalProp && (!(objTypeDef && typeof objTypeDef == 'object') || !(i in objTypeDef))){
                 if(options.coerce){
                     value = instance[i] = options.coerce(value, additionalProp);
                 }
                 checkProp(value,additionalProp,path,i);
             }
             if(!_changing && value && value.$schema){
                 errors = errors.concat(checkProp(value,value.$schema,path,i));
             }
         }
         return errors;
       }
1365449
function isValidFile(file) {
    var fs = require("fs");
    try {
        return fs.statSync(file).isFile();
    } catch (err) {
        return false;
    }
}
844141
function hasBinary(obj) {
  if (!obj || typeof obj !== "object") {
    return false;
  }

  if (isarray(obj)) {
    for (var i = 0, l = obj.length; i < l; i++) {
      if (hasBinary(obj[i])) {
        return true;
      }
    }
    return false;
  }

  if (
    (typeof Buffer === "function" && Buffer.isBuffer && Buffer.isBuffer(obj)) ||
    (typeof ArrayBuffer === "function" && obj instanceof ArrayBuffer) ||
    (withNativeBlob$1 && obj instanceof Blob) ||
    (withNativeFile$1 && obj instanceof File)
  ) {
    return true;
  }

  // see: https://github.com/Automattic/has-binary/pull/4
  if (obj.toJSON && typeof obj.toJSON === "function" && arguments.length === 1) {
    return hasBinary(obj.toJSON(), true);
  }

  for (var key in obj) {
    if (Object.prototype.hasOwnProperty.call(obj, key) && hasBinary(obj[key])) {
      return true;
    }
  }

  return false;
}
372142
def is_filelike(ob):
    
    if hasattr(ob, 'read') and callable(ob.read):
        return True

    if hasattr(ob, 'write') and callable(ob.write):
        return True

    return False
897334
public static boolean contains(byte[] self, Object value) {
        for (byte next : self) {
            if (DefaultTypeTransformation.compareEqual(value, next)) return true;
        }
        return false;
    }