Examples of canWrite()


Examples of org.apache.derby.impl.io.vfmem.VirtualFile.canWrite()

    }

    public void testRenameToSimple() {
        DataStore store = getStore();
        VirtualFile vFile = new VirtualFile("originalFile", store);
        assertFalse(vFile.canWrite());
        vFile.createNewFile();
        assertTrue(vFile.canWrite());
        VirtualFile newFile = new VirtualFile("newFile", store);
        assertFalse(newFile.exists());
        assertTrue(vFile.renameTo(newFile));
View Full Code Here

Examples of org.apache.derby.io.StorageFile.canWrite()

                     SQLState.DATA_UNEXPECTED_EXCEPTION, se);
             }

             canUpdate = false;
             try {
                 if (!dataFactory.isReadOnly() && file.canWrite())
                     canUpdate = true;
             } catch (SecurityException se) {
                 // just means we can't write to it.
             }
View Full Code Here

Examples of org.cfeclipse.cfml.net.RemoteFile.canWrite()

        boolean canRead = true;
        boolean canWrite = true;
        if (element instanceof RemoteFile) {
            RemoteFile file = (RemoteFile)element;
            canRead = file.canRead();
            canWrite = file.canWrite();
        }
        else if (element instanceof File) {
            File file = (File)element;
            canRead = file.canRead();
            canWrite = file.canWrite();
View Full Code Here

Examples of org.cfeclipse.cfml.net.RemoteFileEditorInput.canWrite()

    }
   
    if(element instanceof RemoteFileEditorInput)
    {
        RemoteFileEditorInput input = (RemoteFileEditorInput)element;   
        return input.canWrite();
    }
   
    return super.isModifiable(element);
  }
 
View Full Code Here

Examples of org.eclipse.ui.ide.FileStoreEditorInput.canWrite()

    }
   
    if(element instanceof RemoteFileEditorInput)
    {
        RemoteFileEditorInput input = (RemoteFileEditorInput)element;   
        return input.canWrite();
    }
   
    return super.isModifiable(element);
  }
 
View Full Code Here

Examples of org.eweb4j.util.xml.tag.XmlTag.canWrite()

        if (annotation != null && annotation.length > 0) {
          for (Annotation anno : annotation) {
            XmlTag tag = (XmlTag) anno;
            String type = tag.type();
            String value = tag.value();
            boolean canWrite = tag.canWrite();
            if (canWrite) {
              if (XmlTagType.classType.equals(type)) {
                // 属性为class,进入递归
                property = bean.addElement(n);
                Class<?> cls = null;
View Full Code Here

Examples of org.formic.util.File.canWrite()

          for (String path : runtimePath){
            if (new File(path).canWrite()){
              if (Installer.isUninstall()){
                File eclimDir = new File(path + "/eclim");
                if (eclimDir.exists()){
                  if (eclimDir.canWrite()){
                    filtered.add(path);
                  }else{
                    logger.warn(
                        path + "/eclim is not writable by the current user");
                  }
View Full Code Here

Examples of org.glassfish.grizzly.OutputSink.canWrite()

    private NextAction flush(final FilterChainContext ctx) {
        final HttpContext httpContext = HttpContext.get(ctx);
        assert httpContext != null;
        final OutputSink output = httpContext.getOutputSink();

        if (output.canWrite()) {  // if connection write queue is not overloaded
            return ctx.getStopAction();
        } else { // if connection write queue is overloaded

            // prepare context for suspend
            final NextAction suspendAction = ctx.getSuspendAction();
View Full Code Here

Examples of org.h2.store.fs.FileSystem.canWrite()

        }
        fs.createDirs(fsBase + "/test/x");
        fs.delete(fsBase + "/test");
        fs.delete(fsBase + "/test2");
        assertTrue(fs.createNewFile(fsBase + "/test"));
        assertTrue(fs.canWrite(fsBase + "/test"));
        FileObject fo = fs.openFileObject(fsBase + "/test", "rw");
        byte[] buffer = new byte[10000];
        Random random = new Random(1);
        random.nextBytes(buffer);
        fo.write(buffer, 0, 10000);
View Full Code Here

Examples of org.h2.store.fs.FileSystem.canWrite()

        if (handler != null) {
            tempFileDeleter = handler.getTempFileDeleter();
        }
        try {
            boolean exists = fs.exists(name);
            if (exists && !fs.canWrite(name)) {
                mode = "r";
                this.mode = mode;
            } else {
                fs.createDirs(name);
            }
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.