The application I developed basically allows users to upload contents and get stored in Azure Blob Storage.
Since the nature of the contents are for quick sharing between users, many of the contents are quickly become untouched after a period of time. But for some contents can be used over and over again.
In order to stop the unprecedented growth of the size of blob storage, I am planning to write tool that basically find any blobs that aren't used for period of time and delete them off the storage.
If it was standard file system, I can use "Last Access Time" to indicate when the last time file being used. However, I can't seem to find similar property of the blob to determine Last Access Time.
So does anyone ever come across this situation, what would be the best way to achieve this? Or am I too concerned about this?
Any feedback or suggestion are greatly appreciated.
Thank you in advanced.


You can use block and page blob Properties.LastModifiedUtc to get the last modified date. With Page or Block blob, you would need to use GetBlockBlobReference or GetPageBlobReference API along with FetchAttributes() to get the blob reference and then you can look for LastModifiedUtc.
For example with Block blob here is the code snippet: