You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tika.apache.org by "Tim Allison (JIRA)" <ji...@apache.org> on 2015/09/30 18:01:11 UTC

[jira] [Resolved] (TIKA-1747) Change file->path in tika-batch throughout

     [ https://issues.apache.org/jira/browse/TIKA-1747?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tim Allison resolved TIKA-1747.
-------------------------------
    Resolution: Fixed

r1706060

> Change file->path in tika-batch throughout
> ------------------------------------------
>
>                 Key: TIKA-1747
>                 URL: https://issues.apache.org/jira/browse/TIKA-1747
>             Project: Tika
>          Issue Type: Sub-task
>          Components: batch
>            Reporter: Tim Allison
>            Assignee: Tim Allison
>            Priority: Minor
>             Fix For: 1.11
>
>
> Add Path equivalents for File and deprecate File usage in tika-batch.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

RE: [jira] [Resolved] (TIKA-1747) Change file->path in tika-batch throughout

Posted by Yaniv Kunda <ya...@answers.com>.
Tim - I actually had a shelved changelist with improvements almost identical
to what you did for FSBatchTestBase!
I also shared the thought that the utility methods - countChildren,
readFileToString, deleteDirectory, listPaths - should be elsewhere.
Ideally in commons-io, but this will have to wait until it requires Java 7.

How about in the meantime I concentrate them in tika-core in a new utility
class such as org.apache.tika.io.FileUtils or org.apache.tika.io.Files?
This will expose these methods to other Java7-transitioning code (of which I
have plenty almost ready to be delivered), reducing redundant boilerplate
code.

In addition, I think some of these methods could be slightly improved along
the way, and if they're going to a first-class utility class (no pun
intended), I suggest the following names for clarity and consistency:
countChildren -> countEntries (Files.walkFileTree and DirectoryStream refer
to these as entries)
listPaths -> listEntries (ditto, or use listChildren and leave countChildren
as is)
deleteDirectory -> deleteRecursively (just because it can be technically
used to delete a non-directory file, which is actually convenient)
readFileToString -> toString (as in Guava's Files.toString(File, Charset))

-----Original Message-----
From: Tim Allison (JIRA) [mailto:jira@apache.org]
Sent: Wednesday, September 30, 2015 19:01
To: dev@tika.apache.org
Subject: [jira] [Resolved] (TIKA-1747) Change file->path in tika-batch
throughout


     [
https://issues.apache.org/jira/browse/TIKA-1747?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Tim Allison resolved TIKA-1747.
-------------------------------
    Resolution: Fixed

r1706060

> Change file->path in tika-batch throughout
> ------------------------------------------
>
>                 Key: TIKA-1747
>                 URL: https://issues.apache.org/jira/browse/TIKA-1747
>             Project: Tika
>          Issue Type: Sub-task
>          Components: batch
>            Reporter: Tim Allison
>            Assignee: Tim Allison
>            Priority: Minor
>             Fix For: 1.11
>
>
> Add Path equivalents for File and deprecate File usage in tika-batch.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-- 


This email communication (including any attachments) contains information 
from Answers Corporation or its affiliates that is confidential and may be 
privileged. The information contained herein is intended only for the use 
of the addressee(s) named above. If you are not the intended recipient (or 
the agent responsible to deliver it to the intended recipient), you are 
hereby notified that any dissemination, distribution, use, or copying of 
this communication is strictly prohibited. If you have received this email 
in error, please immediately reply to sender, delete the message and 
destroy all copies of it. If you have questions, please email 
legal@answers.com. 

If you wish to unsubscribe to commercial emails from Answers and its 
affiliates, please go to the Answers Subscription Center 
http://campaigns.answers.com/subscriptions to opt out.  Thank you.