/** * Get Share Information for the current Disk Share * * @return the ShareInfo */ public ShareInfo getShareInformation() throws SMBApiException { try (Directory directory = openDirectory("", of(FILE_READ_ATTRIBUTES), null, ALL, FILE_OPEN, null)) { byte[] outputBuffer = queryInfo( directory.getFileId(), SMB2QueryInfoRequest.SMB2QueryInfoType.SMB2_0_INFO_FILESYSTEM, null, null, FileSystemInformationClass.FileFsFullSizeInformation ).getOutputBuffer(); try { return ShareInfo.parseFsFullSizeInformation(new Buffer.PlainBuffer(outputBuffer, Endian.LE)); } catch (Buffer.BufferException e) { throw new SMBRuntimeException(e); } } }
/** * Get Share Information for the current Disk Share * * @return the ShareInfo */ public ShareInfo getShareInformation() throws SMBApiException { try (Directory directory = openDirectory("", of(FILE_READ_ATTRIBUTES), null, ALL, FILE_OPEN, null)) { byte[] outputBuffer = queryInfo( directory.getFileId(), SMB2QueryInfoRequest.SMB2QueryInfoType.SMB2_0_INFO_FILESYSTEM, null, null, FileSystemInformationClass.FileFsFullSizeInformation ).getOutputBuffer(); try { return ShareInfo.parseFsFullSizeInformation(new Buffer.PlainBuffer(outputBuffer, Endian.LE)); } catch (Buffer.BufferException e) { throw new SMBRuntimeException(e); } } }