Package jcifs.smb

Examples of jcifs.smb.SmbFile.createNewFile()


    public SMBFSEntry addFile(final String name) throws IOException {
        try {
            return AccessController.doPrivileged(new PrivilegedExceptionAction<SMBFSEntry>() {
                public SMBFSEntry run() throws Exception {
                    SmbFile file = new SmbFile(smbFile, name);
                    file.createNewFile();
                    SMBFSFile sfile = new SMBFSFile(SMBFSDirectory.this, file);
                    entries.put(name, sfile);
                    return sfile;
                }
            });
View Full Code Here


      try
      {
        // Open smbfile for write
        if (!file.exists())
        {
          file.createNewFile();
          file = new SmbFile(identifier,pa);
        }
        OutputStream os = file.getOutputStream();
        try
        {
View Full Code Here

      if (smbShare.isUseTempFile()) {

        String tempFileName = _path + smbShare.newTempFileSuffix();
        SmbFile tempFile = createSmbFileObject(tempFileName);
        tempFile.createNewFile();
        Assert.isTrue(tempFile.canWrite(), "Temporary file [" + tempFileName + "] is not writable.");

        FileCopyUtils.copy(_inputStream, tempFile.getOutputStream());

        if (targetFile.exists() && smbShare.isReplaceFile()) {
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.