public String checkWriteProtected(int resIdAction,final File... filesToBeModified){
  if (filesToBeModified != null) {
    for (    File file : filesToBeModified) {
      if ((file != null) && (file.exists()) && (!file.canWrite())) {
        String action=(resIdAction == 0) ? "" : mContext.getString(resIdAction);
        return mContext.getString(R.string.file_err_writeprotected,file.getAbsolutePath(),action);
      }
    }
  }
  return null;
}

public String checkWriteProtected ( int resIdAction , final File ... filesToBeModified ) { if ( filesToBeModified != null ) { for ( File file : filesToBeModified ) { if ( ( file != null ) && ( file . exists ( ) ) && ( ! file . canWrite ( ) ) ) { String action = ( resIdAction == 0 ) ? "" : mContext . getString ( resIdAction ) ; return mContext . getString ( R . string . file_err_writeprotected , file . getAbsolutePath ( ) , action ) ; } } } return null ; }
check if all files in selectedfilenamestobemodified are not write protected .
