Examples of VirtualFile


Examples of be.bagofwords.virtualfile.VirtualFile

            byte actionAsByte = connection.readByte();
            try {
                Action action = Action.values()[actionAsByte];
                if (action == Action.INPUT_STREAM) {
                    String relPath = connection.readString();
                    VirtualFile file = virtualFileService.getRootDirectory().getFile(relPath);
                    if (file.exists()) {
                        InputStream is = file.createInputStream();
                        connection.writeLong(LONG_OK);
                        IOUtils.copy(is, connection.getOs());
                        connection.flush();
                    } else {
                        connection.writeLong(LONG_ERROR);
                        connection.writeString("Could not find file " + relPath);
                        connection.flush();
                    }
                } else if (action == Action.OUTPUT_STREAM) {
                    String relPath = connection.readString();
                    VirtualFile file = virtualFileService.getRootDirectory().getFile(relPath);
                    OutputStream os = file.createOutputStream();
                    connection.writeLong(LONG_OK);
                    connection.flush();
                    IOUtils.copy(connection.getIs(), os);
                } else if (action == Action.EXISTS) {
                    String relPath = connection.readString();
                    VirtualFile file = virtualFileService.getRootDirectory().getFile(relPath);
                    connection.writeBoolean(file.exists());
                    connection.flush();
                } else {
                    connection.writeLong(LONG_ERROR);
                    connection.writeString("Unknown command " + action);
                    connection.flush();
View Full Code Here

Examples of com.intellij.openapi.vfs.VirtualFile

        final MavenPluginsManager plgMgr = MavenPluginsManager.getInstance(project);
        final PluginGoalContainer[] plugins = plgMgr.getPlugins();
        final Set<Report> reports = new HashSet<Report>(plugins.length);

        for (final PluginGoalContainer plugin : plugins) {
            final VirtualFile script = plugin.getScriptFile().getFile();
            if (script == null || !script.isValid() || !FileUtils.exists(script))
                continue;

            final String id;
            if (plugin.getArtifactId() != null)
                id = plugin.getArtifactId();
View Full Code Here

Examples of com.redhat.ceylon.compiler.typechecker.io.VirtualFile

        long t0, t1, t2, t3, t4;
        final TypeCheckerBuilder tcb;
        List<File> onlySources = null;
        List<File> onlyResources = null;
        if (opts.isStdin()) {
            VirtualFile src = new VirtualFile() {
                @Override
                public boolean isFolder() {
                    return false;
                }
                @Override
View Full Code Here

Examples of flex2.compiler.io.VirtualFile

      {
        Class retType = info.getGetterMethod().getReturnType();

        if (VirtualFile.class.isAssignableFrom(retType))
        {
          VirtualFile file = (VirtualFile) info.getGetterMethod().invoke(targetConfig, (Object[])null);
          if (file != null)
          {
            if (info.doChecksum())
              compile_checksum.append(file.getName());
            link_checksum.append(file.getName());
          }
          continue;
        }
        else if (retType.isArray() && VirtualFile.class.isAssignableFrom(retType.getComponentType()))
        {
          VirtualFile[] files = (VirtualFile[]) info.getGetterMethod().invoke(targetConfig, (Object[])null);
          for (int j = 0; files != null && j < files.length; j++)
          {
            if (files[j] != null)
            {
              if (info.doChecksum())
                compile_checksum.append(files[j].getName());
              link_checksum.append(files[j].getName());
            }
          }
          continue;
        }
      }

      if (args[i] instanceof Object[])
      {
        Object[] a = (Object[]) args[i];
        for (int j = 0; j < a.length; j++)
        {
          if (info.doChecksum())
            compile_checksum.append(a[j]);
          link_checksum.append(a[j]);
        }
      }
      else if (args[i] instanceof List)
      {
        List l = (List) args[i];
        for (int j = 0; j < l.size(); j++)
        {
          if (info.doChecksum())
            compile_checksum.append(l.get(j));
          link_checksum.append(l.get(j));
        }
      }
      else
      {
        if (info.doChecksum())
          compile_checksum.append(args[i]);
        link_checksum.append(args[i]);
      }
    }

    if (info.getGetterMethod() == null)
    {
      // C: need to make sure that all the VirtualFile-based config values should have getters.
      return;
    }

    Class retType = info.getGetterMethod().getReturnType();

    if (VirtualFile.class.isAssignableFrom(retType))
    {
      VirtualFile file = (VirtualFile) info.getGetterMethod().invoke(targetConfig, (Object[])null);
      if (file != null && !file.isDirectory())
      {
        if (info.doChecksum())
          compile_checksum_ts.append(file.getLastModified());
        link_checksum_ts.append(file.getLastModified());
      }
    }
    else if (retType.isArray() && VirtualFile.class.isAssignableFrom(retType.getComponentType()))
    {
      VirtualFile[] files = (VirtualFile[]) info.getGetterMethod().invoke(targetConfig, (Object[])null);
View Full Code Here

Examples of jenkins.util.VirtualFile


        // get the build going, and wait until workflow pauses
        WorkflowRun b = j.assertBuildStatusSuccess(foo.scheduleBuild2(0).get());

        VirtualFile archivedFile = b.getArtifactManager().root().child("msg.out");
        assertTrue(archivedFile.exists());
        assertEquals("hello world\n",IOUtils.toString(archivedFile.open()));
    }
View Full Code Here

Examples of net.sourceforge.javautil.common.io.VirtualFile

   * @param target The target file or directory that will store the contents
   *
   * @see #scp(VirtualPath, OutputStream)
   */
  public void scp (VirtualPath source, VirtualArtifact target) throws IOException {
    VirtualFile file = target instanceof VirtualFile ?
      (VirtualFile) target : ((VirtualDirectory)target).createFile(source.getPart(source.getPartCount()-1));
     
    OutputStream output = null;
    try {
      this.scp(source, output = file.getOutputStream());
    } finally {
      if (output != null) output.close();
    }
  }
View Full Code Here

Examples of org.apache.derby.impl.io.vfmem.VirtualFile

                    this.dbData = new DataStore(canonicalName);
                    DATABASES.put(canonicalName, dbData);
                }
            }
            // Specify the data directory and the temp directory.
            dataDirectory = new VirtualFile(canonicalName, dbData);
            tempDir = new VirtualFile(normalizePath(canonicalName, "tmp"),
                                      dbData);

        // Handle cases where the database name is null, but a system home
        // directory has been specified.
        } else if (home != null) {
            // Return the "system home directory" and create a temporary
            // directory for it.
            final String absHome = new File(home).getCanonicalPath();
            synchronized (DATABASES) {
                dbData = (DataStore)DATABASES.get(absHome);
                if (dbData == null) {
                    // Create a new data store for the specified home.
                    dbData = new DataStore(absHome);
                    DATABASES.put(absHome, dbData);
                }
            }
            dataDirectory = new VirtualFile(absHome, dbData);
            tempDir = new VirtualFile(getSeparator() + "tmp", dbData);
        }

        // Create the temporary directory, if one has been specified.
        // Creating the temporary directory too early casues the
        // BaseDataFileFactory to fail, hence the check for uniqueName.
View Full Code Here

Examples of org.apache.oodt.cas.pushpull.filerestrictions.VirtualFile

        // modify vfs to be root based if HOME directory based
        if (!vfs.isRootBased()) {
            String homeDirPath = frs.getHomeDir(remoteSite).getProtocolPath()
                    .getPathString();
            VirtualFile root = new VirtualFile(homeDirPath, true);
            root.addChild(vfs.getRootVirtualFile());
            vfs = new VirtualFileStructure(homeDirPath + "/"
                    + vfs.getPathToRoot(), root.getRootDir());
            frs.changeToHOME(remoteSite);
        }

        // initialize variables
        final String initialCdPath = vfs.getPathToRoot();
        final VirtualFile vf = vfs.getRootVirtualFile();

        // change to initial directory (takes care of Linux auto-mounting)
        frs.changeToDir(initialCdPath, remoteSite);

        // add starting directory to stack
View Full Code Here

Examples of org.eclipse.wst.common.componentcore.internal.resources.VirtualFile

    } else {
      final String fileName = f.getName();    
      IPath ffRuntimePath = flatFile.getModuleRelativePath();
      filePath = ffRuntimePath.toPortableString() + Path.SEPARATOR + fileName;
      if (filter == null || filter.accepts(filePath, true)) {
        return new VirtualFile(project, ffRuntimePath, f) {
          @Override
          public String getName() {
            return fileName;
          }
         
View Full Code Here

Examples of org.jboss.ejb3.vfs.spi.VirtualFile

    * Test to verify the {@link UnifiedVirtualFileFactory} correctly builds {@link UnifiedVirtualFile}
    * instances from a {@link VirtualFile} instance;
    */
   public void testCreate() throws Exception
   {
      final VirtualFile virtualFile = new VirtualFileWrapper(null);
      final UnifiedVirtualFile unifiedVirtualFile = UnifiedVirtualFileFactory.getInstance().create(virtualFile);
      assertNotNull(unifiedVirtualFile);
      assertTrue(unifiedVirtualFile instanceof VirtualFileAdaptor);
   }
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.