@Test public void isDirectoryTest() throws IOException { writeToCache("a/b.txt"); RevTree tree = commitToMaster().getTree(); assertTrue(TreeUtils.isDirectory("a", tree, repo)); assertFalse(TreeUtils.isDirectory("a/b.txt", tree, repo)); assertFalse(TreeUtils.isDirectory("a/b", tree, repo)); }
public static boolean isDirectory(TreeWalk tw) { return TREE.equals(getFileMode(tw)); }
TreeUtils { public static boolean isDirectory(TreeWalk tw) { return TREE.equals(getFileMode(tw)); } }
TreeUtils { public static boolean isDirectory(TreeWalk tw) { return TREE.equals(getFileMode(tw)); }  }
TreeUtils { public static boolean isDirectory(TreeWalk tw) { return TREE.equals(getFileMode(tw)); }  @Nonnull static String normalizeNodePath(String path); @Nonnull static TreeWalk newTreeWalk(AnyObjectId tree, ObjectReader reader); @Nonnull static TreeWalk newTreeWalk(AnyObjectId tree, Repository repo); @Nullable static TreeWalk forPath(String path, AnyObjectId tree, ObjectReader reader); @Nullable static TreeWalk forPath(String path, AnyObjectId tree, Repository repo); static boolean exists(String path, AnyObjectId tree, ObjectReader reader); static boolean exists(String path, AnyObjectId tree, Repository repo); @Nullable static ObjectId getObjectId(TreeWalk tw); @Nullable static ObjectId getObjectId(String path, AnyObjectId tree, ObjectReader reader); @Nullable static ObjectId getObjectId(String path, AnyObjectId tree, Repository repo); @Nullable static FileMode getFileMode(TreeWalk tw); @Nullable static FileMode getFileMode(String path, AnyObjectId tree, ObjectReader reader); @Nullable static FileMode getFileMode(String path, AnyObjectId tree, Repository repo); @Nonnull static InputStream openFile(String path, AnyObjectId tree, ObjectReader reader); @Nonnull static InputStream openFile(String path, AnyObjectId tree, Repository repo); @Nonnull static BlobSnapshot readFile(String path, ObjectId tree, ObjectReader reader); @Nonnull static BlobSnapshot readFile(String path, ObjectId tree, Repository repo); static boolean isDirectory(TreeWalk tw); static boolean isDirectory(String path, AnyObjectId tree, ObjectReader reader); static boolean isDirectory(String path, AnyObjectId tree, Repository repo); static boolean isFile(TreeWalk tw); static boolean isFile(String path, AnyObjectId tree, ObjectReader reader); static boolean isFile(String path, AnyObjectId tree, Repository repo); static boolean isSymbolicLink(TreeWalk tw); static boolean isSymbolicLink(String path, AnyObjectId tree, ObjectReader reader); static boolean isSymbolicLink(String path, AnyObjectId tree, Repository repo); @Nonnull static ObjectId insertTree(TreeFormatter tf, Repository repo); }
TreeUtils { public static boolean isDirectory(TreeWalk tw) { return TREE.equals(getFileMode(tw)); }  @Nonnull static String normalizeNodePath(String path); @Nonnull static TreeWalk newTreeWalk(AnyObjectId tree, ObjectReader reader); @Nonnull static TreeWalk newTreeWalk(AnyObjectId tree, Repository repo); @Nullable static TreeWalk forPath(String path, AnyObjectId tree, ObjectReader reader); @Nullable static TreeWalk forPath(String path, AnyObjectId tree, Repository repo); static boolean exists(String path, AnyObjectId tree, ObjectReader reader); static boolean exists(String path, AnyObjectId tree, Repository repo); @Nullable static ObjectId getObjectId(TreeWalk tw); @Nullable static ObjectId getObjectId(String path, AnyObjectId tree, ObjectReader reader); @Nullable static ObjectId getObjectId(String path, AnyObjectId tree, Repository repo); @Nullable static FileMode getFileMode(TreeWalk tw); @Nullable static FileMode getFileMode(String path, AnyObjectId tree, ObjectReader reader); @Nullable static FileMode getFileMode(String path, AnyObjectId tree, Repository repo); @Nonnull static InputStream openFile(String path, AnyObjectId tree, ObjectReader reader); @Nonnull static InputStream openFile(String path, AnyObjectId tree, Repository repo); @Nonnull static BlobSnapshot readFile(String path, ObjectId tree, ObjectReader reader); @Nonnull static BlobSnapshot readFile(String path, ObjectId tree, Repository repo); static boolean isDirectory(TreeWalk tw); static boolean isDirectory(String path, AnyObjectId tree, ObjectReader reader); static boolean isDirectory(String path, AnyObjectId tree, Repository repo); static boolean isFile(TreeWalk tw); static boolean isFile(String path, AnyObjectId tree, ObjectReader reader); static boolean isFile(String path, AnyObjectId tree, Repository repo); static boolean isSymbolicLink(TreeWalk tw); static boolean isSymbolicLink(String path, AnyObjectId tree, ObjectReader reader); static boolean isSymbolicLink(String path, AnyObjectId tree, Repository repo); @Nonnull static ObjectId insertTree(TreeFormatter tf, Repository repo);  }