import java.io.File
import org.entityfs.util.Directories
import org.entityfs.util.filter.entity.EntityNameFilter
import org.schmant.support.entityfs.SchmantFileSystems
import org.schmant.support.io.TempFileUtil
// Create a read only file system with its root directory in
// /home/me/myproject/src
srcd =
SchmantFileSystems.getEntityForDirectory(
new
File("/home/me/myproject/src"), true)
// Get a view of the root directory that hides all .svn directories. When this
// view is used for getting child directories, all .svn directories will be
// hidden in them too, making all .svn directories in the file system invisible
// for all EntityFS-aware tasks.
// The ~ is used to negate the filter.
srcRoot = srcd.newView(~(new
EntityNameFilter(".svn")))
// Create a read/write file system in a temporary directory to use for putting
// built files in. Keep this directory when the script is done (set keep flag to
// true).
targetRoot =
TempFileUtil.createTempDirectory(
"myproject", null, true)
// Set a temporary directory on the target file system. Tasks that need to
// create temporary files use this directory for them.
targetRoot.fileSystem.setTemporaryFilesDirectory(
Directories.newDirectory(targetRoot, "tmp"))
// Create a read only file system with its root directory in
// /home/me/myproject/src
srcd =
SchmantFileSystems.getEntityForDirectory(
new
File("/home/me/myproject/src"), true);
// Get a view of the root directory that hides all .svn directories. When this
// view is used for getting child directories, all .svn directories will be
// hidden in them too, making all .svn directories in the file system invisible
// for all EntityFS-aware tasks.
srcRoot = srcd.newView(new
EntityNameFilter(".svn").not());
// Create a read/write file system in a temporary directory to use for putting
// built files in. Keep this directory when the script is done (set keep flag to
// true).
targetRoot =
TempFileUtil.createTempDirectory(
"myproject", null, true);
// Set a temporary directory on the target file system. Tasks that need to
// create temporary files use this directory for them.
targetRoot.getFileSystem().setTemporaryFilesDirectory(
Directories.newDirectory(targetRoot, "tmp"));
# Create a read only file system with its root directory in
# /home/me/myproject/src
srcd = Schmant::
SchmantFileSystems.getEntityForDirectory(
Java::JavaIo::
File.new("/home/me/myproject/src"), true)
# Get a view of the root directory that hides all .svn directories. When this
# view is used for getting child directories, all .svn directories will be
# hidden in them too, making all .svn directories in the file system invisible
# for all EntityFS-aware tasks.
srcRoot = srcd.newView(Schmant::
EntityNameFilter.new(".svn").not)
# Create a read/write file system in a temporary directory to use for putting
# built files in. Keep this directory when the script is done (set keep flag to
# true).
targetRoot = Schmant::
TempFileUtil.createTempDirectory(
"myproject", nil, true)
# Set a temporary directory on the target file system. Tasks that need to
# create temporary files use this directory for them.
targetRoot.fileSystem.setTemporaryFilesDirectory(
Schmant::
Directories.newDirectory(targetRoot, "tmp"))
# Create a read only file system with its root directory in
# /home/me/myproject/src
srcd =
SchmantFileSystems.getEntityForDirectory( \
File("/home/me/myproject/src"), True)
# Get a view of the root directory that hides all .svn directories. When this
# view is used for getting child directories, all .svn directories will be
# hidden in them too, making all .svn directories in the file system invisible
# for all EntityFS-aware tasks.
srcRoot = srcd.newView(
EntityNameFilter(".svn").not())
# Create a read/write file system in a temporary directory to use for putting
# built files in. Keep this directory when the script is done (set keep flag to
# true).
targetRoot =
TempFileUtil.createTempDirectory( \
"myproject", None, True)
# Set a temporary directory on the target file system. Tasks that need to
# create temporary files use this directory for them.
targetRoot.getFileSystem().setTemporaryFilesDirectory( \
Directories.newDirectory(targetRoot, "tmp"))