What version of this package are you using?
5.0.2
What problem do you want to solve?
I want to create a torrent file from a folder but I don't want the file paths within the generated torrent file to contain that folder name. For example if I have a this folder structure
In resulting torrent file I want to get this structure:
folder1
--- file1.txt
--- file2.txt
But instead I am getting the original structure with the MyRootFolder as the root folder.
I tried to pass the files to the createTorrent function as an array of stream.Readable with the path props modified, so they don't contain MyRootFolder. Also tried setting the name property. I didn't get the desired result in any case.
What do you think is the correct solution to this problem?
Provide a way to exclude the root folder name from the file paths within the torrent file, so only the content of the specified folder is included without the folder itself.
What version of this package are you using? 5.0.2 What problem do you want to solve? I want to create a torrent file from a folder but I don't want the file paths within the generated torrent file to contain that folder name. For example if I have a this folder structure
In resulting torrent file I want to get this structure:
But instead I am getting the original structure with the MyRootFolder as the root folder.
I tried to pass the files to the
createTorrent
function as an array of stream.Readable with the path props modified, so they don't contain MyRootFolder. Also tried setting thename
property. I didn't get the desired result in any case.What do you think is the correct solution to this problem? Provide a way to exclude the root folder name from the file paths within the torrent file, so only the content of the specified folder is included without the folder itself.