code: private String getPolicyFileHome(File file) {
          if (file == null || !file.exists()) {
              return null;
          }
          return file.getAbsoluteFile().getParent();
      }
docs: Private method for gaining absolute path of folder with policy file .
  
  @param file file with policy
  @return absolute path for folder with policy file or null if file doesn't exist