public class CopyFiles extends Object
| Modifier and Type | Class and Description |
|---|---|
(package private) static class |
CopyFiles.ParserState |
| Modifier and Type | Field and Description |
|---|---|
private org.openide.util.EditableProperties |
currentProperties |
private Set<String> |
excludePatterns |
private Set<String> |
includePatterns |
private File |
sourceRoot |
private File |
targetRoot |
| Modifier | Constructor and Description |
|---|---|
private |
CopyFiles(File source,
File target) |
| Modifier and Type | Method and Description |
|---|---|
static void |
copyDeep(File source,
File target) |
private void |
copyFile(File sourceFile)
Copy given file to target root dir if matches include/exclude patterns.
|
private static void |
copyFile(File sourceFile,
File targetFile)
Copy source file to target file.
|
private void |
copyFolder(File sourceFolder) |
private static void |
ensureParent(File file)
Creates parent of given file, if doesn't exist.
|
private org.openide.util.EditableProperties |
getProperties(String relativePath)
Returns properties from relative path.
|
private static String |
getRelativePath(File root,
File file)
Returns slash separated path relative to given root.
|
private Set<String> |
matchingKeys(String relativePath,
String propertiesPattern)
Returns set of keys matching given pattern.
|
private static Set<String> |
parsePattern(String pattern)
Parses given compound string pattern into set of single patterns.
|
private void |
readPatterns(Reader r)
Reads the include/exclude set from a given reader.
|
private File sourceRoot
private File targetRoot
private org.openide.util.EditableProperties currentProperties
public static void copyDeep(File source, File target) throws IOException
IOExceptionprivate void copyFolder(File sourceFolder) throws IOException
IOExceptionprivate void copyFile(File sourceFile) throws IOException
sourceFile - source fileIOException - if copying failsprivate static String getRelativePath(File root, File file)
private static void copyFile(File sourceFile, File targetFile) throws IOException
sourceFile - source filetargetFile - target fileIOException - if copying failsprivate static void ensureParent(File file) throws IOException
IOExceptionprivate Set<String> matchingKeys(String relativePath, String propertiesPattern) throws IOException
relativePath - path relative to sourceRootpropertiesPattern - pattern like file.properties#keyPatternIOException - if properties cannot be loadedprivate org.openide.util.EditableProperties getProperties(String relativePath) throws IOException
relativePath - relative pathIOException - if cannot open streamprivate void readPatterns(Reader r) throws IOException
r - readerIOExceptionprivate static Set<String> parsePattern(String pattern)
pattern - compound pattern in form filePattern1#keyPattern1#|filePattern2#keyPattern2#|filePattern3Copyright © 2007–2016 Gephi Consortium. All rights reserved.