how to distinguish the file type of GDataEntryFileDoc

9 views
Skip to first unread message

Neil Ni

unread,
Jun 11, 2012, 9:43:06 PM6/11/12
to Google Data APIs Objective-C Client Library Discussion
Hi,
I uploaded a powerpoint test.ppt from my google account. However, when
I try to download all my files from my google account, the test.ppt is
of the class GDataEntryFileDoc, instead of the class
GDataEntryPresentationDoc. If I did not upload my powerpoint with ppt
extension, what might be a better way to distinguish the actual file
type?
thanks a lot!

Neil

Greg Robbins

unread,
Jun 13, 2012, 10:27:31 AM6/13/12
to gdata-objec...@googlegroups.com
This question does not appear to be related to the Objective-C library or the Google Docs API.


If you are trying to determine a file's type, you can sometimes rely on the signature bytes that begin the file.

For example, PowerPoint files should begin with "d0 cf 11 e0 a1 b1 1a e1" according to http://www.forensicswiki.org/wiki/PowerPoint_Presentation_(PPT)

On Mac OS X, you can inspect a file's first bytes with the command line tool hexdump:

hexdump -C /path/to/file  | head

Neil Ni

unread,
Jun 13, 2012, 10:49:38 AM6/13/12
to gdata-objec...@googlegroups.com
thanks! That is really helpful!
Neil


--
You received this message because you are subscribed to the Google Groups "Google Data APIs Objective-C Client Library Discussion" group.
To post to this group, send email to gdata-objec...@googlegroups.com.
To unsubscribe from this group, send email to gdata-objectivec-...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/gdata-objectivec-client?hl=en.

Reply all
Reply to author
Forward
0 new messages