Advertisement
Guest User

Untitled

a guest
Aug 18th, 2017
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. if (processor is LazySchemeProcessor && processor.isDoNotWriteIfOnlyLineSeparatorChanged && file.exists()) {
  2. val detectedLineSeparator = file.detectedLineSeparator
  3. // scheme always uses LF
  4. if (detectedLineSeparator != LineSeparator.LF.separatorString) {
  5. val oldData = file.contentsToByteArray()
  6. if (detectLineSeparators(Charsets.UTF_8.decode(ByteBuffer.wrap(oldData))) != LineSeparator.LF) {
  7.  
  8. }
  9. }
  10. }
  11.  
  12.  
  13. // easy migration if not possible to implement getSchemeState fully correctly
  14. open val isDoNotWriteIfOnlyLineSeparatorChanged: Boolean
  15. get() = false
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement