Yes, using getPath() for the getFile() counterpart.
I'll prepare patches in a few hours.
On Sep 22, 2015 4:35 PM, "Tim Allison (JIRA)" <j...@apache.org> wrote:

>
>     [
> https://issues.apache.org/jira/browse/TIKA-1726?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14902613#comment-14902613
> ]
>
> Tim Allison commented on TIKA-1726:
> -----------------------------------
>
> Thank you, [~kkrugler].  [~kunda], is there enough consensus on this to
> move forward?
>
> > Augment public methods that use a java.io.File with methods that use a
> java.nio.file.Path
> >
> -----------------------------------------------------------------------------------------
> >
> >                 Key: TIKA-1726
> >                 URL: https://issues.apache.org/jira/browse/TIKA-1726
> >             Project: Tika
> >          Issue Type: Improvement
> >          Components: batch, core, gui, parser, translation
> >            Reporter: Yaniv Kunda
> >            Priority: Minor
> >             Fix For: 1.11
> >
> >
> > In light of Java 7 already EOL, it's high time we add support for the
> new java.nio.file.Path class introduced with it, which, together with
> support methods in java.nio.file.Files and others, provide a better file
> I/O framework than java.io.File.
> > In just two cases, we have public methods in tika that only return a
> File object, and cannot be overloaded, so a different name for the new
> method must be created:
> > - {{org.apache.tika.io.TemporaryResources#createTemporaryFile()}}
> > _Suggestions:_
> > -- addTemporaryFile
> > -- addTempFile
> > -- createTempFile
> > -- createTemporaryPath
> > - {{org.apache.tika.io.TikaInputStream#getFile()}}
> > _Suggestions:_
> > -- asFile
> > -- toPath
> > -- getPath
> > In other cases, the methods accept a File as an argument, and should
> remain as tika users might be using them - so an overloaded method that
> accepts a Path instead should be added, referencing the new method from the
> old one (using the @see tag) until java.io.File itself is deprecated or
> otherwise becomes obsolete.
> > Here is the full list of other methods:
> > _tika-app:_
> > - {{org.apache.tika.gui.TikaGUI#openFile(File)}}
> > _tika-batch:_
> > - {{org.apache.tika.batch.fs.FSUtil#getOutputFile(File, String,
> HANDLE_EXISTING, String)}}
> > - {{org.apache.tika.util.PropsUtil#getFile(String, File)}}
> > - {{org.apache.tika.batch.fs.FSDirectoryCrawler}} constructors
> > -
> {{org.apache.tika.batch.fs.FSDirectoryCrawler#handleFirstFileInDirectory(File)}}
> > - {{org.apache.tika.batch.fs.FSFileResource}} constructor
> > - {{org.apache.tika.batch.fs.FSListCrawler}} constructor
> > - {{org.apache.tika.batch.fs.FSOutputStreamFactory}} constructor
> > -
> {{org.apache.tika.batch.fs.FSUtil#checkThisIsAncestorOfOrSameAsThat(File,
> File)}}
> > - {{org.apache.tika.batch.fs.FSUtil#checkThisIsAncestorOfThat(File,
> File)}}
> > - {{org.apache.tika.batch.fs.strawman.StrawManTikaAppDriver}} constructor
> > _tika-core:_
> > - {{org.apache.tika.Tika#detect(File)}}
> > - {{org.apache.tika.Tika#parse(File)}}
> > - {{org.apache.tika.Tika#parseToString(File)}}
> > - {{org.apache.tika.config.TikaConfig}} constructors
> > - {{org.apache.tika.detect.NNExampleModelDetector}} constructor
> > - {{org.apache.tika.detect.TrainedModelDetector#loadDefaultModels(File)}}
> > -
> {{org.apache.tika.io.TemporaryResources#setTemporaryFileDirectory(File)}}
> > - {{org.apache.tika.io.TikaInputStream#get(File)}}
> > - {{org.apache.tika.io.TikaInputStream#get(File, Metadata)}}
> > _tika-parsers:_
> > - {{org.apache.tika.parser.ParsingReader}} constructor
> > - {{org.apache.tika.parser.image.ImageMetadataExtractor#parseJpeg(File)}}
> > - {{org.apache.tika.parser.image.ImageMetadataExtractor#parseWebP(File)}}
> > - {{org.apache.tika.parser.mp4.DirectFileReadDataSource}} constructor
> > _tika-translate:_
> > -
> {{org.apache.tika.language.translate.ExternalTranslator#runAndGetOutput(String,
> String[], File)}}
> > Due to lack of evidence, all public methods in public non-test classes
> (and not in tika-example) are deemed part of a public API - although
> there's no formal definition of such.
> > If anyone knows of a public method which isn't accessed publicly and can
> be defined as package-private, or for another reason, please comment.
>
>
>
> --
> 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 
le...@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.

Reply via email to