code: func checkFileInfoConsistency(f FileInfo) error {
  	if err := checkFilename(f.Name); err != nil {
  		return err
  	}
  
  	switch {
  	case f.Deleted && len(f.Blocks) != 0:
  		// Deleted files should have no blocks
  		return errDeletedHasBlocks
  
  	case f.Type == FileInfoTypeDirectory && len(f.Blocks) != 0:
  		// Directories should have no blocks
  		return errDirectoryHasBlocks
  
  	case !f.Deleted && !f.IsInvalid() && f.Type == FileInfoTypeFile && len(f.Blocks) == 0:
  		// Non-deleted, non-invalid files should have at least one block
  		return errFileHasNoBlocks
  	}
  	return nil
  }
docs: // checkFileInfoConsistency verifies a number of invariants on the given FileInfo