gov.bnl.star.offline.scheduler.util
Class ResolveFilesystemWildcards

java.lang.Object
  extended by java.lang.Thread
      extended by gov.bnl.star.offline.scheduler.util.Task
          extended by gov.bnl.star.offline.scheduler.util.CommandLineTask
              extended by gov.bnl.star.offline.scheduler.util.ResolveFilesystemWildcards
All Implemented Interfaces:
java.lang.Runnable

public class ResolveFilesystemWildcards
extends CommandLineTask

Resolves a wildcard for filenames by executing ls on the local machine. It is actually csh that resolves the wildcard, so what is actually being executed is:

csh -c "ls -1 wildcard"

where wildcard is the string passed through the constructor. To retrieve the result use getResult.

Version:
$Revision: 1.13 $ $Date: 2006/11/21 00:41:29 $
Author:
Gabriele Carcassi

Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler
 
Field Summary
 
Fields inherited from class gov.bnl.star.offline.scheduler.util.Task
exitStatus
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
ResolveFilesystemWildcards(java.lang.String wildcard)
          Creates a new task to resolve wildcards.
 
Method Summary
 java.lang.String[] getResult()
          Returns all the files matched by the wildcard
static void main(java.lang.String[] args)
           
 
Methods inherited from class gov.bnl.star.offline.scheduler.util.CommandLineTask
destroy, getOutput, getOutputReader, run
 
Methods inherited from class gov.bnl.star.offline.scheduler.util.Task
execute, getExitStatus
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ResolveFilesystemWildcards

public ResolveFilesystemWildcards(java.lang.String wildcard)
Creates a new task to resolve wildcards.

Parameters:
wildcard - the wildcard to be resolved: ex. /home/user/pippo/*a/test.*
Method Detail

getResult

public java.lang.String[] getResult()
Returns all the files matched by the wildcard

Returns:
all the matching files

main

public static void main(java.lang.String[] args)


Copyright © 2002-2004 STAR collaboration - Brookhaven National Laboratory. All Rights Reserved.