Lấy tệp đính kèm từ các mục lịch

Aspose.Email - Lấy Tệp đính kèm từ Mục Lịch

Aspose.Email cung cấp bộ sưu tập tệp đính kèm có thể được dùng để lấy các tệp đính kèm liên quan đến mục lịch.

Java


 String savedFile = dataDir + "AppWithAttachments.ics";

Appointment app2 = Appointment.load(savedFile);

System.out.println("Total Attachments: "  + app2.getAttachments().size());

for (int i=0; i< app2.getAttachments().size();i++)

{

	Attachment att = app2.getAttachments().get_Item(i);

	System.out.println(att.getName());

	//Save the attachment to disc

	att.save(att.getName());

}

Tải mã đang chạy

Tải mã mẫu