Java 8 NotDirectoryException - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Java 8 NotDirectoryException class.

This code example shows how to use the following methods:
   */ 
  public DirectoryEntry requireDirectory( 
      Path pathForException) throws NoSuchFileException, NotDirectoryException {
    requireExists(pathForException);
    if (!file().isDirectory()) {
      throw new NotDirectoryException(pathForException.toString());
    } 
    return this;
  } 
 
  /** 
   * Checks that this entry exists and links to a symbolic link, throwing an exception if not. 
   * 
   * @return this 
   * @throws NoSuchFileException if this entry does not exist 
   * @throws NotLinkException if this entry does not link to a symbolic link 
   */ 
  public DirectoryEntry requireSymbolicLink( 
      Path pathForException) throws NoSuchFileException, NotLinkException {
    requireExists(pathForException);
3
CodeRank
Experience pair programming with AI  Get Codota for Java
See Code Examples for Java 8 NotDirectoryException Methods: