Skip to content

Adding list command to show keys of drives managed#32

Open
arunkd13 wants to merge 2 commits intoholepunchto:mainfrom
arunkd13:main
Open

Adding list command to show keys of drives managed#32
arunkd13 wants to merge 2 commits intoholepunchto:mainfrom
arunkd13:main

Conversation

@arunkd13
Copy link

@arunkd13 arunkd13 commented Dec 7, 2023

Fixes #19 by storing the drives created using touch command in a file called 'drives'. This file is then listed when 'drives list' is invoked.


const driveId = HypercoreId.encode(drive.key)
console.log('New drive:', crayon.magenta(HypercoreId.encode(drive.key)))
await fs.appendFile(storage + '/../drives', driveId + '\n')
Copy link
Author

@arunkd13 arunkd13 Dec 7, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would 'list' be a better name for this file, instead of 'drives'?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

list of drive managed keys command

1 participant