info.magnolia.module.files
Interface FileExtractor

All Known Implementing Classes:
BasicFileExtractor, MD5CheckingFileExtractor

public interface FileExtractor

A component to extract files from modules.

Version:
$Revision: $ ($Author: $)
Author:
gjoseph

Nested Class Summary
static interface FileExtractor.Transformer
          Transforms a resource path into a file system path.
 
Method Summary
 void extractFile(String resourcePath, FileExtractor.Transformer transformer)
          Extracts the given resource from the classpath and stores it as dictacted by the given Transformer.
 void extractFile(String resourcePath, String absTargetPath)
          Extracts the given resource from the classpath and stores it as absTargetPath.
 void extractFiles(FileExtractor.Transformer transformer)
          Extracts all found resources from the classpath, using the given Transformer.
 

Method Detail

extractFile

void extractFile(String resourcePath,
                 String absTargetPath)
                 throws IOException
Extracts the given resource from the classpath and stores it as absTargetPath. extractFile("/foo/bar.baz", "/Users/greg/tok.tak"). Does not handle any kind of logic regarding location and name of source and target files.

Throws:
IOException

extractFile

void extractFile(String resourcePath,
                 FileExtractor.Transformer transformer)
                 throws IOException
Extracts the given resource from the classpath and stores it as dictacted by the given Transformer.

Throws:
IOException

extractFiles

void extractFiles(FileExtractor.Transformer transformer)
                  throws IOException
Extracts all found resources from the classpath, using the given Transformer.

Throws:
IOException


Copyright © 2003–2014 Magnolia International Ltd.. All rights reserved.