Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Option to prevent comment from being added? #13

Closed
dazinator opened this issue Oct 14, 2020 · 3 comments
Closed

Option to prevent comment from being added? #13

dazinator opened this issue Oct 14, 2020 · 3 comments

Comments

@dazinator
Copy link

Hi, I was just checking the java property writer out.
When using JavaProperties class and saving modifications, the resulting file always has a comment line added to the top indicating the current date. Is there a way to turn this off?

@Kajabity
Copy link
Owner

Hi, Dazinator,

Currently that line is always written - see https://github.com/Kajabity/Kajabity.Tools.Java/blob/master/Kajabity.Tools.Java/Java/JavaPropertyWriter.cs#L101.

However, I can probably add something to make it optional - a flag defaulting to true which can be set false by the calling class.

I'll have a look this evening/tomorrow and push the changes.

@Kajabity
Copy link
Owner

I've added a new method to JavaProperties - public void Store(Stream streamOut, bool outputTimestamp) that allows you to specify no timestamp output (false).

This should be in the latest NuGet published - or just fetch the code and use locally.

Let me know if this is suitable - I'll close the defect in a couple of weeks if there are no more problems.

Hope this helps.

@dazinator
Copy link
Author

@Kajabity - that's great, thank you very much! ;-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants