Examples of FS


Examples of org.crsh.vfs.FS

    } else {
      if (!root.isDirectory()) {
        throw new IllegalArgumentException("Wrong root directory argument " + root.getCanonicalPath());
      }
    }
    FS cmdFS = new FS().mount(Thread.currentThread().getContextClassLoader(), Path.get("/crash/commands/"));
    FS confFS = new FS().mount(Thread.currentThread().getContextClassLoader(), Path.get("/crash/"));
    PluginContext ctx = new PluginContext(
      new ServiceLoaderDiscovery(Thread.currentThread().getContextClassLoader()),
      Collections.<String, Object>emptyMap(),
      cmdFS,
      confFS,
View Full Code Here

Examples of org.crsh.vfs.FS

    //
    FileMountFactory fileDriver = new FileMountFactory(Utils.getCurrentDirectory());
    ClassPathMountFactory classpathDriver = new ClassPathMountFactory(Thread.currentThread().getContextClassLoader());

    //
    FS cmdFS = new FS.Builder().register("file", fileDriver).register("classpath", classpathDriver).mount(cmd).build();
    FS confFS = new FS.Builder().register("file", fileDriver).register("classpath", classpathDriver).mount(conf).build();
    Bootstrap bootstrap = new Bootstrap(Thread.currentThread().getContextClassLoader(), confFS, cmdFS);

    //
    if (properties != null) {
      Properties config = new Properties();
View Full Code Here

Examples of org.crsh.vfs.FS

   * @return the plugin context
   */
  protected PluginContext create(Map<String, Object> attributes, PluginDiscovery discovery, ClassLoader loader) {

    //
    FS cmdFS;
    FS confFS;
    try {
      cmdFS = createCommandFS();
      confFS = createConfFS();
    }
    catch (IOException e) {
View Full Code Here

Examples of org.crsh.vfs.FS

      stop();
    }

    @PostConstruct
    public void init() {
      FS commandFileSystem = createFileSystem(
          this.properties.getCommandPathPatterns(),
          this.properties.getDisabledCommands());
      FS configurationFileSystem = createFileSystem(
          this.properties.getConfigPathPatterns(), new String[0]);

      PluginDiscovery discovery = new BeanFactoryFilteringPluginDiscovery(
          this.resourceLoader.getClassLoader(), this.beanFactory,
          this.properties.getDisabledPlugins());
View Full Code Here

Examples of org.crsh.vfs.FS

    }

    protected FS createFileSystem(String[] pathPatterns, String[] filterPatterns) {
      Assert.notNull(pathPatterns, "PathPatterns must not be null");
      Assert.notNull(filterPatterns, "FilterPatterns must not be null");
      FS fileSystem = new FS();
      for (String pathPattern : pathPatterns) {
        try {
          fileSystem.mount(new SimpleFileSystemDriver(new DirectoryHandle(
              pathPattern, this.resourceLoader, filterPatterns)));
        }
        catch (IOException ex) {
          throw new IllegalStateException("Failed to mount file system for '"
              + pathPattern + "'", ex);
View Full Code Here

Examples of org.eclipse.jgit.util.FS

          r = new IgnoreNode();
      } else {
        r = new IgnoreNode();
      }

      FS fs = repository.getFS();
      String path = repository.getConfig().get(CoreConfig.KEY)
          .getExcludesFile();
      if (path != null) {
        File excludesfile;
        if (path.startsWith("~/"))
          excludesfile = fs.resolve(fs.userHome(), path.substring(2));
        else
          excludesfile = fs.resolve(null, path);
        loadRulesFromFile(r, excludesfile);
      }

      File exclude = fs
          .resolve(repository.getDirectory(), "info/exclude");
      loadRulesFromFile(r, exclude);

      return r.getRules().isEmpty() ? null : r;
    }
View Full Code Here

Examples of org.eclipse.jgit.util.FS

    try {
      ol.copyTo(channel);
    } finally {
      channel.close();
    }
    FS fs = repo.getFS();
    if (opt.isFileMode() && fs.supportsExecute()) {
      if (FileMode.EXECUTABLE_FILE.equals(entry.getRawMode())) {
        if (!fs.canExecute(tmpFile))
          fs.setExecute(tmpFile, true);
      } else {
        if (fs.canExecute(tmpFile))
          fs.setExecute(tmpFile, false);
      }
    }
    if (!tmpFile.renameTo(f)) {
      // tried to rename which failed. Let' delete the target file and try
      // again
View Full Code Here

Examples of org.eclipse.jgit.util.FS

   *            directory to begin searching in.
   * @return {@code this} (for chaining calls).
   */
  public B findGitDir(File current) {
    if (getGitDir() == null) {
      FS tryFS = safeFS();
      while (current != null) {
        File dir = new File(current, DOT_GIT);
        if (FileKey.isGitRepository(dir, tryFS)) {
          setGitDir(dir);
          break;
View Full Code Here

Examples of org.eclipse.jgit.util.FS

   * the listeners only when it differs.
   */
  private final AtomicInteger lastNotifiedModCnt = new AtomicInteger();

  RefDirectory(final FileRepository db) {
    final FS fs = db.getFS();
    parent = db;
    gitDir = db.getDirectory();
    refsDir = fs.resolve(gitDir, R_REFS);
    logsDir = fs.resolve(gitDir, LOGS);
    logsRefsDir = fs.resolve(gitDir, LOGS + '/' + R_REFS);
    packedRefsFile = fs.resolve(gitDir, PACKED_REFS);

    looseRefs.set(RefList.<LooseRef> emptyList());
    packedRefs.set(PackedRefList.NO_PACKED_REFS);
  }
View Full Code Here

Examples of org.eclipse.jgit.util.FS

          r = new IgnoreNode();
      } else {
        r = new IgnoreNode();
      }

      FS fs = repository.getFS();
      String path = repository.getConfig().get(CoreConfig.KEY)
          .getExcludesFile();
      if (path != null) {
        File excludesfile;
        if (path.startsWith("~/"))
          excludesfile = fs.resolve(fs.userHome(), path.substring(2));
        else
          excludesfile = fs.resolve(null, path);
        loadRulesFromFile(r, excludesfile);
      }

      File exclude = fs
          .resolve(repository.getDirectory(), "info/exclude");
      loadRulesFromFile(r, exclude);

      return r.getRules().isEmpty() ? null : r;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.