[GitHub] [groovy] paulk-asert commented on pull request #1554: GROOVY-4990 Make File.write() create any missing directories. Add test.

2021-04-26 Thread GitBox


paulk-asert commented on pull request #1554:
URL: https://github.com/apache/groovy/pull/1554#issuecomment-826272790


   I merged and tweaked your test and modified the DGM methods as per the 
earlier suggestion. Thanks.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [groovy] paulk-asert commented on pull request #1554: GROOVY-4990 Make File.write() create any missing directories. Add test.

2021-04-25 Thread GitBox


paulk-asert commented on pull request #1554:
URL: https://github.com/apache/groovy/pull/1554#issuecomment-826272790


   I merged and tweaked your test and modified the DGM methods as per the 
earlier suggestion. Thanks.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [groovy] paulk-asert commented on pull request #1554: GROOVY-4990 Make File.write() create any missing directories. Add test.

2021-04-19 Thread GitBox


paulk-asert commented on pull request #1554:
URL: https://github.com/apache/groovy/pull/1554#issuecomment-822236024


   Hi, thanks for your PR. While automatically creating the parent directories 
is in some ways super nice, it might also be surprising for folks familiar with 
current Java behavior. I think I prefer the `mkParentDirs` suggestion mentioned 
in the Jira issue, though I'd probably call it `createParentDirectories` these 
days to match the newer nio styling. Then it could also be used for `setBytes` 
and so on, not just `write`. What do you think about that suggestion and if you 
like the idea, would you feel up for altering the PR?
   Suggested methods to add:
   ```
   File ResourceGroovyMethods#createParentDirectories(File self)
   Path NioExtensions#createParentDirectories(Path self, FileAttribute... 
attrs)
   ```
   Usage:
   ```
   file.createParentDirectories().write(...)
   path.createParentDirectories().bytes = ...
   ```
   What do you think? Or if you want me to progress, just let me know.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org