Skip to content
Snippets Groups Projects
Commit 1de947da authored by brinn's avatar brinn
Browse files

doc: improve javadoc

SVN: 1819
parent d593badb
No related branches found
No related tags found
No related merge requests found
...@@ -66,22 +66,23 @@ public class RecursiveHardLinkMaker implements IPathImmutableCopier ...@@ -66,22 +66,23 @@ public class RecursiveHardLinkMaker implements IPathImmutableCopier
} }
/** /**
* Copies resource (file or directory) to <code>destinationDirectory</code> by duplicating directory structure and * Copies <var>code</var> (file or directory) to <var>destinationDirectory</var> by duplicating directory
* creating hard link for each file. Note that <code>resource</code> cannot be placed directly inside * structure and creating hard link for each file.
* <code>destinationDirectory</code>. * <>p>
* <i>Note that <var>path</var> cannot be placed directly inside <var>destinationDirectory</var>.<i>
* *
* @return pointer to the copied resource or null if copy process failed * @return pointer to the copied resource or null if copy process failed
*/ */
public File tryCopy(File resource, File destinationDirectory) public File tryCopy(File path, File destinationDirectory)
{ {
if (operationLog.isInfoEnabled()) if (operationLog.isInfoEnabled())
{ {
operationLog.info(String.format("Creating a hard link copy of '%s' in '%s'.", resource.getPath(), operationLog.info(String.format("Creating a hard link copy of '%s' in '%s'.", path.getPath(),
destinationDirectory.getPath())); destinationDirectory.getPath()));
} }
String resourceParent = resource.getParentFile().getAbsolutePath(); String resourceParent = path.getParentFile().getAbsolutePath();
assert resourceParent.equals(destinationDirectory.getAbsolutePath()) == false; assert resourceParent.equals(destinationDirectory.getAbsolutePath()) == false;
return tryMakeCopy(resource, destinationDirectory); return tryMakeCopy(path, destinationDirectory);
} }
private File tryMakeCopy(File resource, File destinationDirectory) private File tryMakeCopy(File resource, File destinationDirectory)
......
...@@ -26,10 +26,12 @@ import java.io.File; ...@@ -26,10 +26,12 @@ import java.io.File;
public interface IPathImmutableCopier public interface IPathImmutableCopier
{ {
/** /**
* Creates copy of <code>file</code> in <code>destinationDirectory</code> which should not be modified. Can use * Creates a copy of <code>path</code> (which may be a file or a directory) in
* hard links if it is possible. * <code>destinationDirectory</code>, which must not be modified later.
* <p>
* <i>Can use hard links if available.</i>
* *
* @return pointer to the created file or <code>null</code> if operation failed * @return the new path created, or <code>null</code> if the operation fails
*/ */
File tryCopy(File file, File destinationDirectory); File tryCopy(File path, File destinationDirectory);
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment