Re: reg:lseek&read ..pls

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



"sandhya" <sandhyar@xxxxxxxxxxxxxx> writes:
> But before that i need to know the size of the object from which i am =
> trying to get the contents.
> How can i do this?

Same way you'd do it for a Unix file: seek to the end, note the end
offset, seek back to the start and read.

	... lo_open ...
	lo_size = lo_lseek(conn, fd, 0, SEEK_END);  // where's the end?
	lo_lseek(conn, fd, 0, SEEK_SET);  // go back to start

			regards, tom lane


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux