Examples of IFile


Examples of com.netfever.common.datasource.api.IFile

  public String getMime(String name) throws StorageException {
    String res;
    byte[] buf = new byte[256];
    int nread;
    InputStream in;
    IFile file = null;
   
    try {
      file = this.datasource.getRoot().getFileItem(name + ".mime")

      if (file.exists()) {
        res = "";

        in = file.openRead();

        try {
          while ((nread = in.read(buf)) > 0) {
            res = res + new String(buf, 0, nread);
          }
        } finally {
          in.close();
        }

        return res;
      } else {
        return null;
      }
    } catch (NetfeverException e) {
      throw new StorageException(e.getDetails(), e);
    } catch (IOException e) {
      UUID uuid = UUID.randomUUID();
     
      throw new StorageException(
          new FaultDetails(
              uuid.toString(),
              0,
              "Streaming error. Contact administrator with id " + uuid,
              "Error reading stream " +
              file.getAbsoluteName() +
              " with error " +
              e.getMessage(),
              null),
          e);     
    }
View Full Code Here

Examples of floobits.common.interfaces.IFile

        return true;
    }

    @Override
    public void removeHighlight(final Integer userId, final String path) {
        final IFile iFile = findFileByPath(path);
        if (iFile == null) {
            return;
        }
        editor.queue(new Runnable() {
            @Override
View Full Code Here

Examples of gw.fs.IFile

  @Override
  public void createTables() {
    try {
      Connection connection = _database.getConnection().connect();
      IFile createTableFile = _database.getDdlFile();
      String statements = readFile(createTableFile);
      connection.createStatement().executeUpdate(statements);
      connection.close();
    } catch (SQLException e) {
      throw new RuntimeException(e);
View Full Code Here

Examples of org.apache.aries.application.filesystem.IFile

                                       JarFile jarFile,
                                       ModuleIDBuilder idBuilder)
        throws IOException, DeploymentException {
        ApplicationMetadataFactory factory = getApplicationMetadataFactory();
        IDirectory ebaFile = FileSystem.getFSRoot(new File(jarFile.getName()));
        IFile applicationManifestFile = ebaFile.getFile(AppConstants.APPLICATION_MF);
        Manifest applicationManifest;
        if (applicationManifestFile != null) {
            InputStream in = applicationManifestFile.open();
            try {
                applicationManifest = ManifestProcessor.parseManifest(in);
            } finally {
                try { in.close(); } catch (IOException ignore) {}
            }
View Full Code Here

Examples of org.apache.aries.util.filesystem.IFile

             
          int last_slash = fullPath.lastIndexOf("/");
          appName = fullPath.substring(last_slash + 1, fullPath.length());
      }
                 
      IFile deploymentManifest = ebaFile.getFile(AppConstants.DEPLOYMENT_MF);
      /* We require that all other .jar and .war files included by-value be valid bundles
       * because a DEPLOYMENT.MF has been provided. If no DEPLOYMENT.MF, migrate
       * wars to wabs, plain jars to bundles
       */
      Set<BundleInfo> extraBundlesInfo = new HashSet<BundleInfo>();
View Full Code Here

Examples of org.eclipse.core.resources.IFile

    public Image decorateImage(Image image, Object element) {
       
        DirectAccessCompositeImageDescriptor descriptor = new DirectAccessCompositeImageDescriptor(image);

        if (element instanceof IFile) {
            IFile file = (IFile) element;
           
            if (file.getFileExtension() != null && file.getFileExtension().equals("tml")) {
                if (WGADesignStructureHelper.isDirectAccess(file)) {
                    descriptor.getImageData();
                    return descriptor.createImage();
                }
            }
View Full Code Here

Examples of org.eclipse.core.resources.IFile

            final List<IResource> resourcesChanged = new ArrayList<IResource>();
          
            event.getDelta().accept(new IResourceDeltaVisitor() {                  
                public boolean visit(IResourceDelta delta) throws CoreException {
                    if (delta.getResource() instanceof IFile) {
                        IFile file = (IFile)delta.getResource();
                        if (file.getFileExtension().equals("tml")) {
                            resourcesChanged.add(file);
                        } else if (file.getFileExtension().equals("xml") && WGADesignStructureHelper.isMetadataFolder(file.getParent())) {
                            resourcesChanged.addAll(Arrays.asList(file.getParent().getParent().members(IResource.FILE)));
                        }
                    } else if (delta.getResource() instanceof IFolder) {
                        IFolder folder = (IFolder) delta.getResource();
                        if (WGADesignStructureHelper.isMetadataFolder(folder)) {
                            resourcesChanged.addAll(Arrays.asList(folder.getParent().members(IResource.FILE)));
View Full Code Here

Examples of org.eclipse.core.resources.IFile

  public void doSaveAs() {
  }

  public void resourceChanged(IResourceChangeEvent event) {
    try {
      final IFile fRuntimeConfigFile = ((IFileEditorInput)getEditorInput()).getFile();
      final IFile fWGAConfigFile = _wgaRuntime.getWGAConfigFile();
      event.getDelta().accept(new IResourceDeltaVisitor() {

        public boolean visit(IResourceDelta delta) throws CoreException {
          if (delta.getResource().equals(fRuntimeConfigFile)) {
            if (delta.getResource().exists()) {
View Full Code Here

Examples of org.eclipse.core.resources.IFile

                    public boolean visit(IResource resource) throws CoreException {
                        if(resource instanceof IFolder){
                            return true;
                        }
                        if(resource instanceof IFile){
                            IFile currentFile = (IFile)resource;
                            if(("."+currentFile.getFileExtension()).equals(_filterExtension)){
                                fileList.add(currentFile);
                            }                           
                        }
                        return false;
                    }
View Full Code Here

Examples of org.eclipse.core.resources.IFile

  }


  public String getText(Object element) {
    if (element instanceof IFile) {
        IFile file = (IFile) element;
      return file.getFullPath().toString();
    } else {
      return null;
    }
  }
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.