String smbUrl = "smb://domain;username:password@server/share/myNewDirectory"; SmbFile smbFile = new SmbFile(smbURL); try{ smbFile.mkdir(); }catch(SmbException e){...}
/** * Creates a directory with the path specified by this <tt>SmbFile</tt> * and any parent directories that do not exist. This method will fail * when used with <code>smb://</code>, <code>smb://workgroup/</code>, * <code>smb://server/</code>, or <code>smb://server/share/</code> URLs * because workgroups, servers, and shares cannot be dynamically created * (although in the future it may be possible to create shares). * * @throws SmbException */ public void mkdirs() throws SmbException { SmbFile parent; try { parent = new SmbFile( getParent(), auth ); } catch( IOException ioe ) { return; } if( parent.exists() == false ) { parent.mkdirs(); } mkdir(); }
/** * Creates a directory with the path specified by this <tt>SmbFile</tt> * and any parent directories that do not exist. This method will fail * when used with <code>smb://</code>, <code>smb://workgroup/</code>, * <code>smb://server/</code>, or <code>smb://server/share/</code> URLs * because workgroups, servers, and shares cannot be dynamically created * (although in the future it may be possible to create shares). * * @throws SmbException */ public void mkdirs() throws SmbException { SmbFile parent; try { parent = new SmbFile( getParent(), auth ); } catch( IOException ioe ) { return; } if( parent.exists() == false ) { parent.mkdirs(); } mkdir(); }
SmbFile sFile = new SmbFile(path, authentication); sFile.mkdir();
/** * Creates a directory with the path specified by this <tt>SmbFile</tt> * and any parent directories that do not exist. This method will fail * when used with <code>smb://</code>, <code>smb://workgroup/</code>, * <code>smb://server/</code>, or <code>smb://server/share/</code> URLs * because workgroups, servers, and shares cannot be dynamically created * (although in the future it may be possible to create shares). * * @throws SmbException */ public void mkdirs() throws SmbException { SmbFile parent; try { parent = new SmbFile( getParent(), auth ); } catch( IOException ioe ) { return; } if( parent.exists() == false ) { parent.mkdirs(); } mkdir(); }
@Override public void mkdir() throws IOException { // Ensure that the jcifs.smb.SmbFile's path ends with a '/' otherwise it will throw an exception checkSmbFile(true); // Note: unlike java.io.File.mkdir(), SmbFile does not return a boolean value // to indicate if the folder could be created file.mkdir(); }
/** * Creates a directory with the path specified by this <tt>SmbFile</tt> * and any parent directories that do not exist. This method will fail * when used with <code>smb://</code>, <code>smb://workgroup/</code>, * <code>smb://server/</code>, or <code>smb://server/share/</code> URLs * because workgroups, servers, and shares cannot be dynamically created * (although in the future it may be possible to create shares). * * @throws SmbException */ public void mkdirs() throws SmbException { SmbFile parent; try { parent = new SmbFile( getParent(), auth ); } catch( IOException ioe ) { return; } if( parent.exists() == false ) { parent.mkdirs(); } mkdir(); }
/** * Creates this file as a folder. */ @Override protected void doCreateFolder() throws Exception { file.mkdir(); file = createSmbFile(getName()); }
/** * Creates this file as a folder. */ @Override protected void doCreateFolder() throws Exception { file.mkdir(); file = createSmbFile(getName()); }
if( path.length() > 1 ) { try { dest.mkdir(); dest.setPathInformation( attributes, createTime, lastModified ); } catch( SmbException se ) {
if( path.length() > 1 ) { try { dest.mkdir(); dest.setPathInformation( attributes, createTime, lastModified ); } catch( SmbException se ) {
if( path.length() > 1 ) { try { dest.mkdir(); dest.setPathInformation( attributes, createTime, lastModified ); } catch( SmbException se ) {
if( path.length() > 1 ) { try { dest.mkdir(); dest.setPathInformation( attributes, createTime, lastModified ); } catch( SmbException se ) {
if ( path.length() > 1 ) { try { dest.mkdir(); if ( dh.hasCapability(SmbConstants.CAP_NT_SMBS) ) { dest.setPathInformation(src.getAttributes(), src.createTime(), src.lastModified(), src.lastAccess());
if ( path.length() > 1 ) { try { dest.mkdir(); if ( dh.hasCapability(SmbConstants.CAP_NT_SMBS) ) { dest.setPathInformation(src.getAttributes(), src.createTime(), src.lastModified(), src.lastAccess());