ruper2/src/java/core/org/krysalis/ruper/api FileAPI.java,1.2,1.3

[email protected]
Newsgroups gmane.comp.krysalis.metamorphosis.cvs
Message-ID <[email protected]>
Update of /cvsroot/metamorphosis/ruper2/src/java/core/org/krysalis/ruper/api
In directory sc8-pr-cvs1:/tmp/cvs-serv15024/src/java/core/org/krysalis/ruper/api

Modified Files:
	FileAPI.java 
Log Message:
1) created a Construuctor that takes (String id) on ResourceUpdater and RepositorySet,
so Anou's config can create them.

2) Created a simple <update ant task that leverages above to update a file.

Guts of (2) not completed.

Index: FileAPI.java
===================================================================
RCS file: /cvsroot/metamorphosis/ruper2/src/java/core/org/krysalis/ruper/api/FileAPI.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** FileAPI.java	8 Sep 2003 23:21:41 -0000	1.2
--- FileAPI.java	9 Sep 2003 18:37:05 -0000	1.3
***************
*** 18,21 ****
--- 18,22 ----
  import org.krysalis.ruper.resource.Resource;
  import org.krysalis.ruper.resource.ResourceSpecifier;
+ import org.krysalis.ruper.util.io.ResolvedFile;
  import org.krysalis.version.util.SystemUtils;
  
***************
*** 24,27 ****
--- 25,29 ----
   */
  public class FileAPI /* implements Referenceable */ {
+ 	private File m_baseFile = null;
  	private ResourceFilenameAnalyzer m_analyzer = null;
  
***************
*** 40,43 ****
--- 42,51 ----
  			new DefaultResourceFilenameAnalyzer(
  				new VirtualResourceLocator(baseFile));
+ 
+ 		m_baseFile = baseFile;
+ 	}
+ 
+ 	public File resolveFile(Object file) {
+ 		return ResolvedFile.resolve(m_baseFile, file);
  	}
  
***************
*** 58,62 ****
  		return resource.getSpecifier();
  	}
! 	
  	public static void main(String args[]) throws Exception {
  		String file = "test.jar";
--- 66,70 ----
  		return resource.getSpecifier();
  	}
! 
  	public static void main(String args[]) throws Exception {
  		String file = "test.jar";




-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.