Package org.olat.core.util

Examples of org.olat.core.util.FileVisitor


    System.out.println("END");
    if(true) return;
    **/
   
   
    FileVisitor fv2 = new FileVisitor() {
     
      public void visit(File file) {
        // TODO Auto-generated method stub
        String fname = file.getName();
        if (!file.isDirectory() && fname.equals("LocalStrings.properties")) { // /de/org/olat/admin/cache/LocalStrings.properties
View Full Code Here


   
    final String pkgbase = srcbase+"/"+pack.replace('.','/');

    final Set pset = new HashSet();
   
    FileVisitor fv2 = new FileVisitor() {

      public void visit(File file) {
        String fname = file.getName();
        //System.out.println("filename: "+file.getAbsolutePath());
        if (!file.isDirectory() && fname.endsWith(".java")) {
View Full Code Here

   
    final String pkgbase = srcbase+"/"+pack.replace('.','/');

    final Set pset = new HashSet();
   
    FileVisitor fv2 = new FileVisitor() {

      public void visit(File file) {
        String fname = file.getName();
        //System.out.println("filename: "+file.getAbsolutePath());
        if (!file.isDirectory() && fname.endsWith(".java")) {
View Full Code Here

  /**
   * @param args
   */
  public static void main(String[] args) {
    // work in progress
    FileVisitor fv = new FileVisitor() {

      public void visit(File file) {
        // TODO Auto-generated method stub
        String fname = file.getName();
        if (fname.endsWith(".java")) {
View Full Code Here

    // package org.olat.admin(.xxx) -> package org.abc.def.ghi(.xxx)
    // and import org.olat.admin(.xxx) -> import org.abc.def.ghi(.xxx)
    // in headers

    // clear the cvs stuff
    FileVisitor fcvs = new FileVisitor() {

      public void visit(File file) {
        if (file.getParentFile().isDirectory() && file.getParentFile().getName().equals("CVS")) {
          FileUtils.deleteDirsAndFiles(file, true, true);
        }
      }

    };
    FileUtils.visitRecursively(todirF, fcvs);

    System.out.println("adjusting file contents......");
   
    final String regexp3 = packageFrom.replaceAll("\\.", "\\\\.");
   
    FileVisitor fv = new MF(regexp3, packageTo);

    FileUtils.visitRecursively(new File(srcbase), fv);

  }
View Full Code Here

      for (int i = 0; i < courses.length; i++) {
        String course = courses[i];
        File courseRoot = new File(coursesRoot, course);
        File cFolder = new File(courseRoot, "coursefolder");
        log.audit("visiting "+cFolder.getAbsolutePath());
        FileVisitor fv = new FileVisitor() {

          public void visit(File file) {
            String rpage = null;
            String fname = file.getName();
            if ((file.isFile())&&(fname.endsWith(".htm") || fname.endsWith(".html"))) {
View Full Code Here

  public void addMenuToZip(String pathToCPOfflineMatDir, String pathToRepository) {
    final File cpOfflineMatDir = new File(pathToCPOfflineMatDir);
    File pathToRepositoryDir = new File(pathToRepository);

    FileUtils.visitRecursively(pathToRepositoryDir, new FileVisitor() {
      private CPOfflineReadableManager corm = CPOfflineReadableManager.getInstance();

      public void visit(File file) {
        if (file.getName().equals("imsmanifest.xml")) {
          File unzippedDir = file.getParentFile();
View Full Code Here

  /**
   *
   */
  private void convertRunAndEditorStructureToUtf8(String pathToCourseHome) {
    final File courseHome = new File(pathToCourseHome);
    FileUtils.visitRecursively(courseHome, new FileVisitor() {
      public void visit(File file) {
        //System.out.println("visiting file " + file.getAbsolutePath());
        String fName = file.getName();
        // all files named editortreemodel.xml and runstructure.xml in a
        // subfolder of the course home
View Full Code Here

TOP

Related Classes of org.olat.core.util.FileVisitor

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.