Code example for Path

Methods: normalize

0
    this.files = files;
  } 
 
  @Override 
  public boolean exists(Path path) {
    return files.containsKey(path.normalize().toString());
  } 
 
  @Override 
  public Optional<String> readFileIfItExists(Path path) {
    String content = files.get(path.normalize().toString());
    return Optional.fromNullable(content);
  } 
} 
Connect your IDE to all the code out there  Get Codota for Java