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 Based on the idea that globe (which will be similar to match made by your shell) An example of running a file tree and searching for files based on globe can be found in the Oracle Java tutorial. cat
cat myfiles * .txt | Java MyDataProcessor
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.
Pyramenture matcher = file system .get default (). GetPathMatcher ("globe: myfiles * .txt"); Matcher.matches (filename);
Comments
Post a Comment