lucenenet-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Garski (JIRA)" <j...@apache.org>
Subject [jira] Updated: (LUCENENET-210) FSDirectory - DirectoryInfo vs. FileInfo
Date Mon, 09 Nov 2009 20:10:32 GMT

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

Michael Garski updated LUCENENET-210:
-------------------------------------

    Attachment: FSDirectory V2.patch

Here's take 2 of the patch that swaps out to DirectoryInfo but leaves the FileInfo methods
intact - they simply convert the FileInfo to a DirectoryInfo and use the new overloads.  The
methods that take FileInfo are marked obsolete.  I did not make changes to anything in the
Index namespace yet - that can be done as a separate issue.

Three things to note with this patch:

1) The patch I submitted for LUCENENET-208 should be disregarded until this patch is reviewed,
accepted, and committed.  I'll create a new patch for that issue at that time.

2) I did not bother with backwards compatibility with the FSLockFactory class as it is new
for 2.9, so there is no FileInfo support.

3) The FSDirectory.GetFile() method still returns a FileInfo instance as in the past, but
I marked it as obsolete and added a method named GetDirectory that returns a DirectoryInfo.
 Any thoughts on that?

All of the tests in the TestDirectory class now pass.  There is still some cleanup to be done
internally in the port that I will tackle once I have the rest of the Store namespace in functional
shape with all tests passing.



> FSDirectory - DirectoryInfo vs. FileInfo
> ----------------------------------------
>
>                 Key: LUCENENET-210
>                 URL: https://issues.apache.org/jira/browse/LUCENENET-210
>             Project: Lucene.Net
>          Issue Type: Bug
>            Reporter: Michael Garski
>         Attachments: FSDirectory V2.patch, FSDirectory_di_vs_fi.patch
>
>
> From what I know of the Java File class, it can represent a file or a directory, whereas
in .NET the explicit classes FileInfo and DirectoryInfo would apply.  I've altered the usage
of the two different classes depending on what the purpose is, be it a directory or a file.
 This does change the interface to instantiation of classes such as IndexReader with a DirectoryInfo
object as opposed to a FileInfo object which is more precise and actually cleans up the internals
a bit.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message