In Java, how can I read data from multiple files using posix wildcard syntax? -


Currently, I have a script which is the system for system processing. I am passing this data from many files to cat

  cat myfiles * .txt | Java MyDataProcessor   

Based on the idea that cat creates something incompetence versus Java opens files directly, I want to optimize it where the Java file opens There is a java library which makes it quite easy (i.e., it handles pozix wildcards in the translation file). Z7 has added a path matcher class which can be used to validate on a path name basis.

globe (which will be similar to match made by your shell)

  Pyramenture matcher = file system .get default (). GetPathMatcher ("globe: myfiles * .txt"); Matcher.matches (filename);   

An example of running a file tree and searching for files based on globe can be found in the Oracle Java tutorial.

Comments

Popular posts from this blog

Python SQLAlchemy:AttributeError: Neither 'Column' object nor 'Comparator' object has an attribute 'schema' -

java - How not to audit a join table and related entities using Hibernate Envers? -

mongodb - CakePHP paginator ignoring order, but only for certain values -