public void mkdirs(String path) throws IOException { $(path).mkdirs(); } }
public void mkdirs(String path) throws IOException { $(path).mkdirs(); } }
String url = "smb://myserver/share/"+ edittext.getText().toString(); SmbFile smfile = null; try { NtlmPasswordAuthentication auth =new NtlmPasswordAuthentication("domain","user","password"); smfile = new SmbFile(url, auth); if(!smfile.exists()) { smfile.mkdirs(); } String timeStamp = new SimpleDateFormat("yyyyMMdd_HHmmss").format(new Date()); url = "smb://myserver/share/"+ edittext.getText().toString()+"/IMG_"+ timeStamp + ".jpg";
/** * Creates the specified remote path if not yet exists. * If the specified resource is a file rather than a path, creates all directories leading * to that file. * @param _path remote path to create * @return always true (error states are express by exceptions) * @throws IOException on error conditions returned by a CIFS server */ @Override public boolean mkdir(String _path) throws IOException { try { SmbFile dir = createSmbDirectoryObject(_path); if (!dir.exists()) { dir.mkdirs(); if (logger.isInfoEnabled()) { logger.info("Successfully created remote directory [" + _path + "] in share [" + this.smbShare + "]."); } } else { if (logger.isInfoEnabled()) { logger.info("Remote directory [" + _path + "] exists in share [" + this.smbShare + "]."); } } return true; } catch (SmbException _ex) { throw new NestedIOException("Failed to create directory [" + _path + "].", _ex); } }
smbdir.mkdirs();
/** * 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(); }
/** * 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(); }
log.debug("Parent does not exist " + p); parent.mkdirs();
/** * 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(); }
log.debug("Parent does not exist " + p); parent.mkdirs();
if ( !parent.exists() ) parent.mkdirs();
remoteRoot.mkdirs();
remoteRoot.mkdirs();