Package org.myphotodiary.util

Examples of org.myphotodiary.util.DirFilter


  protected int appendSubDirectories(List<JsonDirData> allDirectories, List<Directory> indexedDirectories, File parentDir, int dirIx, String relativePath) {
    System.out.println("Directory: " + dirIx + ", " + relativePath);
    int ix = dirIx;
    if (parentDir.isDirectory()) {
      File[] subDirs = parentDir.listFiles(new DirFilter());
      Arrays.sort(subDirs);
      JsonDirData dirData;
      for (File subDir: subDirs) {
        if (!relativePath.endsWith("/")) {
          relativePath += "/";
View Full Code Here


  protected int appendSubDirectories(List<JsonDirData> allDirectories, List<Directory> indexedDirectories, File parentDir, int dirIx, String relativePath) {
    System.out.println("Directory: " + dirIx + ", " + relativePath);
    int ix = dirIx;
    if (parentDir.isDirectory()) {
      File[] subDirs = parentDir.listFiles(new DirFilter());
      Arrays.sort(subDirs);
      JsonDirData dirData;
      for (File subDir: subDirs) {
        if (!relativePath.endsWith("/")) {
          relativePath += "/";
View Full Code Here

  protected int appendSubDirectories(List<JsonDirData> allDirectories, List<Directory> indexedDirectories, File parentDir, int dirIx, String relativePath) {
    System.out.println("Directory: " + dirIx + ", " + relativePath);
    int ix = dirIx;
    if (parentDir.isDirectory()) {
      File[] subDirs = parentDir.listFiles(new DirFilter());
      Arrays.sort(subDirs);
      JsonDirData dirData;
      for (File subDir: subDirs) {
        if (!relativePath.endsWith("/")) {
          relativePath += "/";
View Full Code Here

    if (dir.isDirectory()) {
      try {
        // RBAC on the parent directory
        AccessController.checkAuthorization(path, request, Action.browse, null);
        File[] subDirs = dir.listFiles(new DirFilter());
        Arrays.sort(subDirs);
        int ix = 0;
        if (!path.endsWith("/")) {
          path += "/";
        }
View Full Code Here

  protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
    String path = request.getParameter(Configuration.pathParam);
    File dir = new File((path == null? cfg.imageRootPath: cfg.imageRootPath + path));
    String jsonObject = "[";
    if (dir.isDirectory()) {
      File[] subDirs = dir.listFiles(new DirFilter());
      Arrays.sort(subDirs);
      int ix = 0;
      if (!path.endsWith("/")) {path+="/";};
      for (File subDir: subDirs) {
        jsonObject += "\"" + path + subDir.getName() + "\"";
View Full Code Here

  protected int appendSubDirectories(List<JsonDirData> allDirectories, List<Directory> indexedDirectories, File parentDir, int dirIx, String relativePath) {
    System.out.println("Directory: " + dirIx + ", " + relativePath);
    int ix = dirIx;
    if (parentDir.isDirectory()) {
      File[] subDirs = parentDir.listFiles(new DirFilter());
      Arrays.sort(subDirs);
      JsonDirData dirData;
      for (File subDir: subDirs) {
        if (!relativePath.endsWith("/")) {
          relativePath += "/";
View Full Code Here

    if (dir.isDirectory()) {
      try {
        // RBAC on the parent directory
        AccessController.checkAuthorization(path, request, Action.browse, null);
        File[] subDirs = dir.listFiles(new DirFilter());
        Arrays.sort(subDirs);
        if (!path.endsWith("/")) {
          path += "/";
        }
        ;
View Full Code Here

   */
  protected List<JsonDirIndex> getSubDirectories(String currPath, List<Directory> indexedDirectories) {
    List<JsonDirIndex> subDirs = new ArrayList<JsonDirIndex>();
    File currDir = new File(cfg.imageRootPath + currPath);
    if (currDir.isDirectory()) {
      File[] subDirFiles = currDir.listFiles(new DirFilter());
      Arrays.sort(subDirFiles);
      JsonDirIndex dirData;
      String subDirPath;
      Hashtable<String, JsonDirIndex> dirMap = new Hashtable<String, JsonDirIndex>();
      // Create the json list of subdirectories
View Full Code Here

   */
  protected List<JsonDirIndex> getSubDirectories(String currPath, List<Directory> indexedDirectories) {
    List<JsonDirIndex> subDirs = new ArrayList<JsonDirIndex>();
    File currDir = new File(cfg.imageRootPath + currPath);
    if (currDir.isDirectory()) {
      File[] subDirFiles = currDir.listFiles(new DirFilter());
      Arrays.sort(subDirFiles);
      JsonDirIndex dirData;
      String subDirPath;
      Hashtable<String, JsonDirIndex> dirMap = new Hashtable<String, JsonDirIndex>();
      // Create the json list of subdirectories
View Full Code Here

   */
  protected List<JsonDirIndex> getSubDirectories(String currPath, List<Directory> indexedDirectories) {
    List<JsonDirIndex> subDirs = new ArrayList<JsonDirIndex>();
    File currDir = new File(cfg.imageRootPath + currPath);
    if (currDir.isDirectory()) {
      File[] subDirFiles = currDir.listFiles(new DirFilter());
      Arrays.sort(subDirFiles);
      JsonDirIndex dirData;
      String subDirPath;
      Hashtable<String, JsonDirIndex> dirMap = new Hashtable<String, JsonDirIndex>();
      // Create the json list of subdirectories
View Full Code Here

TOP

Related Classes of org.myphotodiary.util.DirFilter

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.