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

    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 offline Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    19,959
    Rep Power
    31

    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
    Location
    Northern Virginia, United States
    Posts
    6,217
    Rep Power
    12

    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.

    Regards,
    Jim
    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, 08:58 AM
  2. Paths
    By N00Bie in forum New To Java
    Replies: 5
    Last Post: 02-22-2011, 11:48 PM

Posting Permissions

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