Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9129447
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T07:44:56+00:00 2026-06-17T07:44:56+00:00

I am looking for an efficient way to implement a hierarchial file/folder tree in

  • 0

I am looking for an efficient way to implement a hierarchial file/folder tree in redis and be able to easily move nodes around.

/
  a/
     a1
     a2
     b/
        b1
        b2
        c/
           c1
  x/
     x1
     y/
        y1

I’d like to store the above tree and easily be able to make operations such as

move node /a/b/c to /foo/a/b/c 
move node /a/b/c to /x/c
delete node /a/b

Pointers to existing implementation models etc. would be helpful.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T07:44:57+00:00Added an answer on June 17, 2026 at 7:44 am

    The schema I designed which helps one to easily add, move and rename both nodes and entries

    # **enode** a hierarchical directory in redis
    # A folder/node structure where nodes can have sub-nodes and entries. 
    # Entries can have tags.
    #
    # Each entry gets an enodeid and an entryid
    # enodeid - The id of the directory that contains the entry
    # entryid - The id of this entry within this enode/directory
    #
    # The data schema is as follows
    #   enodeid:kids -  Sorted set containing the kids for each directory
    #                   The topmost node is a string "root" and not a number
    #                   The sort score is actually the enodeid of the corresponding kid
    #                   so if /a has an enodeid of 2 and is a kid of root the entry is
    #                   root:kids [2, "a"]
    #                   If a directory /a/b exists and has an enodeid of 4 than
    #                   2:kids = [4, "b"] - here 2 is the enodeid of '/a'
    #
    #   enodeid:meta -  Hash entry containing the name and parent of an enodeid
    #                   2:meta = {name: "a", parentid: "root"}
    #                   4:meta = {name: "b", parentid: 2}
    #
    #   enode.next.id - Unique enode id's
    #
    #   entry.next.id - Unique entry id's
    #
    #   enodeid:entries -   Sorted set containing the entries in a directory
    #                       The sort score is the sequence number of the entry withi the directory
    #                       moveEntry moves the entry up/down within this
    #
    #   enodeid.entry.num - Unique entry id's for a given enodeid
    #
    #   enodeid:tags -  Sorted list of tags
    #                   Score is tagcount, memeber is tag
    #
    #   enodeid:axs -   List of usernames that have access to this folder
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm looking for an efficient way to implement a concurrent tree structure. If that
I'm looking for an efficient way to implement a serialization mechanism in C. I
I am looking at The most efficient way to implement an integer based power
I am looking for ideas on an efficient way to implement a log window
I'm looking for an efficient way to implement the same kind of layout that
I'm looking for an efficient way to get the list of unique commit authors
I have a table which contains many records. I'm looking for an efficient way
Looking for suggestions for an efficient way to maintain basic audit fields for entities
I am looking for a more efficient way to do comparisons between all elements
I am looking for a most efficient way to re-use widgets with different selectors...

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.