John Källén
John Källén

Reputation: 7973

Is there a naming scheme is appropriate for referring to a file within an archive?

I'm working on an application which is supposed to be able to refer not only to files directly, but also files located within an archive (such as ZIP or TAR). As an example, suppose I have the archive foo.zip, inside of which I have a directory bar and a file fred.txt. If I want to refer to the archive as a whole, I would write foo.zip; if I wanted to refer to the fred.txt inside the archive, I would use something similar to

foo.zip#bar/fred.txt

where the octothorpe indicates "change of namespace" from file system to archive.

Before I go running off and reinvent the wheel, I wanted to discover whether there already is an established way to refer to a file within an archive in this manner?

Upvotes: 0

Views: 25

Answers (1)

Joni
Joni

Reputation: 111359

There is a convention in Java to use a ! for URLs of resources inside compressed files, see for example http://docs.oracle.com/javase/7/docs/api/java/net/JarURLConnection.html

Upvotes: 1

Related Questions