Results 1 to 3 of 3
  1. #1
    ark is offline Senior Member
    Join Date
    Apr 2015
    Rep Power

    Default How to store paths

    I have such question - I need serialize some folder with subfolders and files within, then deserialize it the original structure to some another folder.
    I have already created the solution that serialize the files content in List<Streams> and stores the the path to this files in another List<string>. It happened to be fine solution indeed maybe it is error prone that it could lead to inconsistency of streamlist(i) and pathlist(i).
    Should I use just some Node class for folder that have the List/Set of folders and files (separately)? Is the last solution the preferential?

  2. #2
    Norm's Avatar
    Norm is online now Moderator
    Join Date
    Jun 2008
    Eastern Florida
    Rep Power

    Default Re: How to store paths

    Moved to own thread.
    If you don't understand my response, don't ignore it, ask a question.

  3. #3
    jim829 is offline Senior Member
    Join Date
    Jan 2013
    Northern Virginia, United States
    Rep Power

    Default Re: How to store paths

    Is there a specific reason you are using serialization for this? Why not just use the ZipFile API and store the folders in a zip file? You should be able to extract them where you want them.

    The JavaTM Tutorials | SSCCE | Java Naming Conventions
    Poor planning on your part does not constitute an emergency on my part

Similar Threads

  1. Paths And Such
    By han003 in forum New To Java
    Replies: 6
    Last Post: 03-25-2011, 09:58 AM
  2. Paths
    By N00Bie in forum New To Java
    Replies: 5
    Last Post: 02-23-2011, 12:48 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts