throw new IOException( "Bad file descriptor" ); ensureOpen();
throw new IOException( "Bad file descriptor" ); ensureOpen();
throw new IOException( "Bad file descriptor" ); ensureOpen();
throw new IOException( "Bad file descriptor" ); ensureOpen();
try ( SmbFileHandleImpl fh = ensureOpen(); SmbTreeHandleImpl th = fh.getTree() ) { if ( log.isDebugEnabled() ) {
try ( SmbFileHandleImpl fh = ensureOpen(); SmbTreeHandleImpl th = fh.getTree() ) { if ( log.isDebugEnabled() ) {
public void write( byte[] b, int off, int len ) throws IOException { if( len < 0 ) { len = 0; } if(( pipe.pipeType & SmbNamedPipe.PIPE_TYPE_CALL ) == SmbNamedPipe.PIPE_TYPE_CALL ) { pipe.send( new TransWaitNamedPipe( path ), new TransWaitNamedPipeResponse() ); pipe.send( new TransCallNamedPipe( path, b, off, len ), new TransCallNamedPipeResponse( pipe )); } else if(( pipe.pipeType & SmbNamedPipe.PIPE_TYPE_TRANSACT ) == SmbNamedPipe.PIPE_TYPE_TRANSACT ) { ensureOpen(); TransTransactNamedPipe req = new TransTransactNamedPipe( pipe.fid, b, off, len ); if (dcePipe) { req.maxDataCount = 1024; } pipe.send( req, new TransTransactNamedPipeResponse( pipe )); } } }
SmbFileOutputStream ( SmbFile file, boolean append, int openFlags, int access, int sharing ) throws SmbException { this.file = file; this.append = append; this.openFlags = openFlags; this.sharing = sharing; this.access = access | SmbConstants.FILE_WRITE_DATA; try ( SmbTreeHandleImpl th = file.ensureTreeConnected() ) { this.smb2 = th.isSMB2(); try ( SmbFileHandleImpl fh = ensureOpen() ) { if ( append ) { this.fp = fh.getInitialSize(); } init(th); if ( !append && this.smb2 ) { // no open option for truncating, need to truncate the file Smb2SetInfoRequest treq = new Smb2SetInfoRequest(th.getConfig(), fh.getFileId()); treq.setFileInformation(new FileEndOfFileInformation(0)); th.send(treq, RequestParam.NO_RETRY); } } } catch ( CIFSException e ) { throw SmbException.wrap(e); } }
SmbFileOutputStream ( SmbFile file, boolean append, int openFlags, int access, int sharing ) throws SmbException { this.file = file; this.append = append; this.openFlags = openFlags; this.sharing = sharing; this.access = access | SmbConstants.FILE_WRITE_DATA; try ( SmbTreeHandleImpl th = file.ensureTreeConnected() ) { this.smb2 = th.isSMB2(); try ( SmbFileHandleImpl fh = ensureOpen() ) { if ( append ) { this.fp = fh.getInitialSize(); } init(th); if ( !append && this.smb2 ) { // no open option for truncating, need to truncate the file Smb2SetInfoRequest treq = new Smb2SetInfoRequest(th.getConfig(), fh.getFileId()); treq.setFileInformation(new FileEndOfFileInformation(0)); th.send(treq, RequestParam.NO_RETRY); } } } catch ( CIFSException e ) { throw SmbException.wrap(e); } }