Java Path Resolve nio resolveMaxStep(String rootPath)

Here you can find the source of resolveMaxStep(String rootPath)

Description

resolve Max Step

License

Apache License

Declaration

public static int resolveMaxStep(String rootPath) 

Method Source Code


//package com.java2s;
//License from project: Apache License 

import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class Main {
    public static int resolveMaxStep(String rootPath) {
        int maxStep = 0;
        while (Files.exists(Paths.get(rootPath + File.separator + String.valueOf(maxStep + 1)))) {
            maxStep++;//from   w  w  w . ja  v a2  s  .c o m
        }
        return maxStep;
    }
}

Related

  1. resolve(Path path1, Path path2)
  2. resolve(Path target, Collection paths)
  3. resolve(Path workingDir, List paths, String file)
  4. resolveBagUri(final Path baseDir, final URI bagUri)
  5. resolveForSymbolic(final Path path)
  6. resolvePath(final Path baseDirPath, final Path userPath)
  7. resolvePathElements(final Path path)
  8. resolveSymLink(Path link)