[GRADLEREV-19] Separate copy details for files and directories Created: 24/Jul/13  Updated: 25/Jul/16  Resolved: 25/Jul/16

Status: Resolved
Project: Gradle Code Review Tasks
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Task Priority: Major
Reporter: Adam Murdoch Assignee: Luke Daley
Resolution: Done Votes: 0
Labels: None


 Description   

At this stage you can't transform or exclude directories or any of the other stuff that FileCopyDetails allows. So, the parameter should be FileTreeElement, or perhaps a new DirectoryCopyDetails type.



 Comments   
Comment by Luke Daley [ 05/Aug/13 ]

includeEmptyDirs should live on DirectoryCopyDetails.

Comment by Luke Daley [ 05/Aug/13 ]

How are we going to manage the backwards compatibility aspect of this?

We could:

1. continue to have CopySpec.eachFile() receive a FileCopyDetails for directories as well, and issue a deprecation warning if they call any method on it if its a directory.
2. add eachDirectory(Action<? super DirectoryCopyDetails>)

Comment by Adam Murdoch [ 22/Oct/13 ]

There's not really any backward compatibility issue here. CopySpec.eachFile() is invoked only for files, not directories.

Comment by Adam Murdoch [ 22/Oct/13 ]

The code review item was only to make internal changes so that CopyActionProcessingStreamAction receives a thing that represents a file when the entry is a file, and a thing that represents a directory when the entry is a directory (and later a thing that represents a symlink when the entry is a symlink). The thing that represents a directory should not have methods to get at the contents of the file.

Later we can start pushing this stuff up to the API.

Comment by Pepper Lebeck-Jobe [ 25/Jul/16 ]

Closing these clearly obsolete review issues. They haven't been touched in more than 2 years and the reviews for which they were originally opened are closed in Crucible.

Generated at Wed Jun 30 11:18:24 CDT 2021 using Jira 8.4.2#804003-sha1:d21414fc212e3af190e92c2d2ac41299b89402cf.