Examples of canRead()


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

  @Override
  public String findLibrary(String name)
  {
    Path path = _libexec.lookup("lib" + name + ".so");

    if (path.canRead()) {
      return path.getNativePath();
    }
   
    path = _libexec.lookup("lib" + name + ".jnilib");
View Full Code Here

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

  }

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

  @Override
View Full Code Here

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

        IAclGetter aclGetter = (IAclGetter)file.getFileOperations().getOperation(IAclGetter.class);
        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.nexirius.util.XFile.canRead()

        mainModel.setFileNameModel(settings.getFileNameModel());

        XFile settingsFile = new XFile(SETTINGS_FILENAME);

        if (settingsFile.exists() && settingsFile.canRead()) {
            String fullName = null;
            try {
                PushbackInputStream in = new PushbackInputStream(settingsFile.getBufferedInputStream());
                settings.readDataFrom(in);
                fullName = settings.getFileNameModel().getFullName();
View Full Code Here

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

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

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

        }

        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.canRead()

  }
 
  public DefaultSettings() {
    mProperties = new Properties();
    File settingsFile = new File(FILENAME);
    if (settingsFile.canRead() && !TVBrowser.isTransportable()) {
      StreamUtilities.inputStreamIgnoringExceptions(settingsFile,
          new InputStreamProcessor() {

            @Override
            public void process(InputStream input) throws IOException {
View Full Code Here

Examples of java.io.File.canRead()

   */
  private void readSearchFormSettings() {
    try {
      String home = Plugin.getPluginManager().getTvBrowserSettings().getTvBrowserUserHome();
      File settingsFile = new File(home,SETTINGS_FILE);
      if (!settingsFile.canRead()) {
        createDefaultSearchFormSettings();
        return;
      }
      StreamUtilities.objectInputStream(settingsFile,
          new ObjectInputStreamProcessor() {
View Full Code Here

Examples of java.io.File.canRead()

        }
        else if (data instanceof String) {
          String name = ((String) data).trim();
          if (name.toLowerCase().endsWith("jar")) {
            File pluginFile = new File(name);
            if (pluginFile.canRead()) {
              addPluginFile(pluginFile, files);
              if (!files.isEmpty()) {
                break;
              }
            }
View Full Code Here

Examples of java.io.File.canRead()

    final ArrayList<ProgramFilter> filterArr = new ArrayList<ProgramFilter>();

    /* Sort the list*/
    try {
      File filterFile = new File(mFilterDirectory, FILTER_INDEX);
      if (filterFile.canRead()) {
        StreamUtilities.bufferedReader(filterFile,
          new BufferedReaderProcessor() {
            public void process(BufferedReader inxIn) throws IOException {
              String curFilterName = inxIn.readLine();
              while (curFilterName != 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.