Ticket T115600
Visible to All Users

Provide the FullName property in the IFileInfo interface

created 11 years ago

[DevExpress Support Team: the issue is extracted from the T113812 ticket]

Hi,
Could you please add a FullName property to the IFileInfo interface, because now it is only possible to get separate Name and DirectoryName values. And IFileInfo cannot be converted to FileInfo.

Thanks

Show previous comments (2)
Andrey Marten (DevExpress Support) 10 years ago

    Hello Edgar,

    Thank you for sharing your opinion with us. We do not have plans to add this property to the IFileInfo interface in the near future, and you need to use the combination of the DirectoryName and Name properties instead.

    As a possible solution, you can create a corresponding extension:

    C#
    public static class FileInfoExtensions { public static string GetFullName(this IFileInfo fileInfo) { if(fileInfo != null) { return fileInfo.DirectoryName + "\\"+ fileInfo.Name; } else { return string.Empty; } } }

    and use it to retrieve a full file name:

    C#
    IFileInfo file = OpenFileDialogService.Files.First(); var ResultFileName = file.GetFullName();

    If we decide to add this property, we will post corresponding information on our website. Please stay tuned to our announcements.

    Thanks,
    Andrey

      I know this is an old post, but something's changed for the positive. This works for me. I can convert a MVVM.IFileInfo to a System.IO.FileInfo.

      C#
      ( ( DevExpress.Mvvm.UI.FileInfoWrapper )this.FileDialogService.File ).FileInfo and then I am able to access the IO.FileInfo properties.

      Hope it helps someone else!

      Andrey Marten (DevExpress Support) 6 years ago

        Hello,

        Thank you for sharing this information. I agree that it can help other customers.

        Just in case, we implemented the GetFullName extension method (this method is a part of the DevExpress.Mvvm.FileInfoExtensions class) for the IFileInfo interface in the context of this thread: T262161 - Add the FullPath property to the IFileInfo interface. I posted a corresponding Answer in this thread so that other customers can find this information more easily.

        Thanks,
        Andrey

        Answers approved by DevExpress Support

        created 6 years ago

        Hello,

        We implemented the GetFullName extension method (this method is a part of the DevExpress.Mvvm.FileInfoExtensions class) for the IFileInfo interface in the context of this thread: T262161 - Add the FullPath property to the IFileInfo interface.

        Thanks,
        Andrey

          Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

          Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.