Home Forums .NET libraries Xceed Zip & Real-Time Zip for .NET ZipManager Demo Full File Paths Needed.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064
    #19620 |

    I have been using the ZipManagerCS demo as a reference for my project, but cannot get the following to work:

    After you create a new archive, and add files, in the following function, I need to get the full path to the file on disk, including drive/folder/filename in the following existing function. But none of the methods in AbstractFile return this value. I expected FullName to return this, but it does not, it returns “\filename”. Can someone please help?

    -Frank

    private void FillFileList()
    {
    Cursor.Current = Cursors.WaitCursor;
    ZipContentsList.Items.Clear();

    if( m_zipRoot != null )
    {
    try
    {
    AbstractFile[] Files = m_zipRoot.GetFiles(m_zipEvents, null, true);

    // We want to freeze the list update while we add items.
    ZipContentsList.BeginUpdate();

    try
    {
    foreach( AbstractFile File in Files )
    {
    ZipContentsList.Items.Add( new ZipContentsItem( ( ZippedFile ) File ) );
    }
    }
    finally
    {
    ZipContentsList.EndUpdate();
    }
    }
    catch( Exception except )
    {
    MessagePanel.Text = except.Message;
    }
    }

    Cursor.Current = Cursors.Default;
    }

    Imported from legacy forums. Posted by fperugini (had 2320 views)

    Xceed Support
    Member
    Post count: 5658

    Hi fperugini,

    the behavior you have is what it suppose to be. Since your are working with a ZipArchive object, the GetFiles method will return ZippedFile objects. The FullName property will return the fullname inside the zip archive. (the root archive itself is “\” so that’s why you get “\Filename”)

    We added, with the april 10th 2006 update, a new property called: HostedFullName. This property will return, on every classes derived from FileSystemItem, the FullName of the item even if it is inside of an archive or ftp.

    Here’s some examples:

    D:\MyFile.txt
    D:\MyZip.zip\MyFile.txt
    ftp://ftp.xceed.com\FileSystem.txt
    ftp://ftp.xceed.com\FileSystem.tar.gz\FileSystem.tar\FileSystem.txt

    Hope this helps!

    Imported from legacy forums. Posted by Jacques [Xceed] (had 3068 views)

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.