From b4f2c4c5267945a9fcfe190409cc00cdd3091c02 Mon Sep 17 00:00:00 2001 From: Ray Greenwell Date: Thu, 19 Jun 2003 01:12:59 +0000 Subject: [PATCH] Added isUnpacked(), which lets us know if the bundle is downloaded and ready to go. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2667 542714f4-19e9-0310-aa3c-eee0fc999fb1 --- src/java/com/threerings/resource/ResourceBundle.java | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/java/com/threerings/resource/ResourceBundle.java b/src/java/com/threerings/resource/ResourceBundle.java index 2bcea6711..2e3b72ed3 100644 --- a/src/java/com/threerings/resource/ResourceBundle.java +++ b/src/java/com/threerings/resource/ResourceBundle.java @@ -1,5 +1,5 @@ // -// $Id: ResourceBundle.java,v 1.17 2003/06/18 16:54:17 mdb Exp $ +// $Id: ResourceBundle.java,v 1.18 2003/06/19 01:12:59 ray Exp $ package com.threerings.resource; @@ -69,6 +69,16 @@ public class ResourceBundle return _source; } + /** + * @return true if the bundle is fully downloaded and successfully + * unpacked. + */ + public boolean isUnpacked () + { + return (_source.exists() && (_unpacked != null) && + (_unpacked.lastModified() == _source.lastModified())); + } + /** * Called by the resource manager once it has ensured that our * resource jar file is up to date and ready for reading.