/** * Returns the absolute path relative to the root of the store * given a particular document path. * * @param documentPath String * @return String */ protected String toAbsolutePath(String documentPath) { return getRootDir().getAbsolutePath() + File.separatorChar + documentPath; }
/** * Returns the absolute path relative to the root of the store * given a particular document path. * * @param documentPath String * @return String */ protected String toAbsolutePath(String documentPath) { return getRootDir().getAbsolutePath() + File.separatorChar + documentPath; }
public boolean exists() { if (getRootDir() == null) { if (logger.isDebugEnabled()) logger.debug("Root directory for Store does not exist"); return false; } return getRootDir().exists(); }
public boolean exists() { if (getRootDir() == null) { if (logger.isDebugEnabled()) logger.debug("Root directory for Store does not exist"); return false; } return getRootDir().exists(); }
public String[] getAllDocumentPaths() { List<String> list = new ArrayList<String>(256); // exhaustive traverse of absolute paths gatherAbsolutePaths(getRootDir().getAbsolutePath(), list); // convert to array String[] array = list.toArray(new String[list.size()]); // down shift to relative paths String absRootPath = getRootDir().getAbsolutePath() + File.separatorChar; int absRootPathLen = absRootPath.length(); for (int i = 0; i < array.length; i++) { array[i] = array[i].substring(absRootPathLen); // so as to be consistent with expected store syntax array[i] = array[i].replace("\\", "/"); } return array; }
public String[] getAllDocumentPaths() { List<String> list = new ArrayList<String>(256); // exhaustive traverse of absolute paths gatherAbsolutePaths(getRootDir().getAbsolutePath(), list); // convert to array String[] array = list.toArray(new String[list.size()]); // down shift to relative paths String absRootPath = getRootDir().getAbsolutePath() + File.separatorChar; int absRootPathLen = absRootPath.length(); for (int i = 0; i < array.length; i++) { array[i] = array[i].substring(absRootPathLen); // so as to be consistent with expected store syntax array[i] = array[i].replace("\\", "/"); } return array; }