Package org.olat.core.util.vfs

Examples of org.olat.core.util.vfs.LocalImpl


      item = ((MergeSource)item).getRootWriteContainer();
    }
    if (item instanceof OlatRelPathImpl) {
      relPath = ((OlatRelPathImpl) item).getRelPath();
    } else if (item instanceof LocalImpl) {
      LocalImpl impl = (LocalImpl) item;
      String absolutPath = impl.getBasefile().getAbsolutePath();
      if (absolutPath.startsWith(getCanonicalRoot())) {
        relPath = absolutPath.substring(getCanonicalRoot().length());
      }
    }
    return relPath;
View Full Code Here


    return FolderConfig.versionsEnabled(parent);
  }

  private File getOriginFile(VFSItem item) {
    if (item instanceof LocalImpl) {
      LocalImpl localImpl = (LocalImpl) item;
      return localImpl.getBasefile();
    }
    if (item instanceof OlatRelPathImpl) {
      OlatRelPathImpl relPath = (OlatRelPathImpl) item;
      return new File(getCanonicalRoot(), relPath.getRelPath());
    }
View Full Code Here

      // catch the events from the file chooser controller here
      if (event instanceof FileChoosenEvent) {
        // User pressed select button, get selected item from controller
        VFSItem selectedItem = FileChooserUIFactory.getSelectedItem((FileChoosenEvent)event);
        // for this demo just get file path and display an info message
        LocalImpl localFile = (LocalImpl) selectedItem;
        String absPath = localFile.getBasefile().getAbsolutePath();
        String relPath = absPath.substring(WebappHelper.getContextRoot().length());
        getWindowControl().setInfo("user selected " + relPath);
       
      else if (event == Event.CANCELLED_EVENT) {
        // user pressed cancel
View Full Code Here

TOP

Related Classes of org.olat.core.util.vfs.LocalImpl

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.