Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

How to create symlinks in swift?

Hello! I'd like to be able to create a symlink or something equivalent in swift. I upload an object named:

/my-project/sub-project/$TIMESTAMP/file.tar.gz

$TIMESTAMP varies so I could have a lot of timestamped objects "under" /my-project/sub-project.

I'd like to create or update a link pointing to the latest:

/my-project/sub-project/current/file.tar.gz

My research showed two ways of doing it. The first is to make my container versioned, so essentially I'd leave timestamp management up to swift. I'm not too happy with this because access to the older objects has to be done in the backup container, which is not ideal.

There's another approach using manifests but it felt way too complicated:

https://developer.rackspace.com/blog/simulate-symLinks-on-cloud-files/

Finally, the third way is to just manually copy objects to their corresponding "current" version, which will waste storage space.

I'd be grateful for any pointers on the best way to proceed here :)