Examples of canWrite()


Examples of aQute.bnd.service.RepositoryPlugin.canWrite()

                boolean writableRepoSelected = false;
                IStructuredSelection selection = (IStructuredSelection) viewer.getSelection();
                Object element = selection.getFirstElement();
                if (element instanceof RepositoryPlugin) {
                    RepositoryPlugin repo = (RepositoryPlugin) element;
                    writableRepoSelected = repo.canWrite();
                }
                addBundlesAction.setEnabled(writableRepoSelected);
            }
        });
        tree.addMouseListener(new MouseAdapter() {
View Full Code Here

Examples of com.caucho.vfs.Path.canWrite()

   
    // #4333 - check watchdog-manager.log can be written
    WriteStream testOut = logPath.openAppend();
    testOut.close();
   
    if (! logPath.canWrite()) {
      throw new ConfigException("Cannot open " + logPath.getNativePath()
                                + " required for Resin start. Please check permissions");
    }

    RotateStream logStream = RotateStream.create(logPath);
View Full Code Here

Examples of com.google.walkaround.wave.server.conv.PermissionCache.Permissions.canWrite()

  }

  @Override
  public void checkCanModify(SlobId id) throws AccessDeniedException {
    Permissions perms = getPerms(id);
    if (!perms.canWrite()) {
      throw new AccessDeniedException("No write access to " + id + ": " + perms);
    }
  }

  @Override
View Full Code Here

Examples of com.intridea.io.vfs.operations.IAclGetter.canWrite()

        aclGetter.process();
        fileAcl = aclGetter.getAcl();

        // Owner can read/write
        Assert.assertTrue(aclGetter.canRead(Acl.Group.OWNER));
        Assert.assertTrue(aclGetter.canWrite(Acl.Group.OWNER));

        // Authorized coldn't read/write
        Assert.assertFalse(aclGetter.canRead(Acl.Group.AUTHORIZED));
        Assert.assertFalse(aclGetter.canWrite(Acl.Group.AUTHORIZED));
View Full Code Here

Examples of com.sun.xfile.XFile.canWrite()

                files[i] = files[i] + "/";
            }

            size[i] = "" + f2.length();

            if(f2.canWrite())
            {
                accessible = FtpConnection.W;
            }
            else if(f2.canRead())
            {
View Full Code Here

Examples of com.xebialabs.overthere.OverthereFile.canWrite()

        assertThat("Expected temporary file to exist after writing to it", tempFile.exists(), equalTo(true));
        assertThat("Expected temporary file to not be a directory", tempFile.isDirectory(), equalTo(false));
        assertThat("Expected temporary file to have the size of the contents written to it", tempFile.length(), equalTo((long) contents.length));
        assertThat("Expected temporary file to be readable", tempFile.canRead(), equalTo(true));
        assertThat("Expected temporary file to be writeable", tempFile.canWrite(), equalTo(true));

        // Windows systems don't support the concept of checking for executability
        if (connection.getHostOperatingSystem() == OperatingSystemFamily.UNIX) {
            assertFalse("Expected temporary file to not be executable", tempFile.canExecute());
        }
View Full Code Here

Examples of java.io.File.canWrite()

        // deleted if necessary.
        resumeMarker = 0;
        File localFile = new File(localPath);   
        if (localFile.exists()) {
            // if resuming, we must find the marker
            if (!localFile.canWrite())
                throw new FTPException(localPath
                        + " is readonly - cannot write");
            if (resume)
                resumeMarker = localFile.length();
        }
View Full Code Here

Examples of java.io.File.canWrite()

            if (!file.exists()) {
                if (!file.createNewFile()) {
                    return;
                }
            }
            if (file.canWrite()) {
                FileOutputStream output = new FileOutputStream(file);
                toolWindowManager.getPersistenceDelegate().save(output);

                output.close();
                //logger.info("Successfully saved layout.");
View Full Code Here

Examples of java.io.File.canWrite()

      //
      File f = new File(tmpDirPath);
      assertTrue(f.exists());
      assertTrue(f.isDirectory());
      assertTrue(f.canWrite());
      assertEquals(0, f.list().length);
   }
}
View Full Code Here

Examples of java.io.File.canWrite()

            throw new TeiidException(msg);
        }
       

        //test if file can be written to
        if (!tmpFile.canWrite()) {
            final String msg = CorePlugin.Util.getString("FileUtils.Unable_to_write_file_in", dirPath); //$NON-NLS-1$           
            throw new TeiidException(msg);
        }

        //test if file can be read
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.