.graffle files with java file api

Hi,
I am trying out some java apis on .graffle files. To be specific File.isDirectory().
For a .graffle file with no images but only a canvas ,the api returns false,which means it is treated as a file. Also on the mac file system it is not displayed as a package.

For a .graffle file with images , the api returns true, which means it is treated as a folder. Also on the mac file system it is displayed as a package.

This is causing few issues for my application. Why are all .graffle files not treated as a package?
Can the behaviour be made consistent?

Regards,
Abhi

This post was flagged by the community and is temporarily hidden.

This is a per-document option, in the Document inspector.

Some people find one format more useful than the other, so we offer both. The package keeps the images separate from the main graffle xml, which can be handy if you’re checking the document into a source control system or something.

If you save a template file with whichever format is more convenient, then new documents created from that template will have that preference set already.