How do I make specific tasks download to specific folders?
I need each task in this file :https://github.com/Ishikudeska/NolvusForLinux/blob/main/NexusForLinux/src/backend/ModDownloader/Downloader.cs
to download to a specific folder, which is specified in a string in this file:https://github.com/Ishikudeska/NolvusForLinux/blob/main/NexusForLinux/src/backend/FilePaths/FilePaths.cs
14 Replies
What, in this list of URLs, defines where it should be downloaded to?
it doesn't, so should I put that there?
How else are you going to know what goes where?
You should have something like
ok ok
thanks
Srry I'm a total noob when it comes to C#, this is only my third project.
Is there a way to name each URL list? They also need to be settable to "un-used" as some of them (such as the "Redux/Ultra" ones might not be used. The Required ones can go in one big thing, but other than that they need to be slectable
Just add a name property to DownloadList
ok
so would it look something like:
var downloads = DownloadList[]{
downloads.Add(new CoreSkse()){//implementation}
downloads.Add(new BugFixes()){//implementation}
or would the curly brackets go inside the parenthesis
like:
download.Add(new CoreSkse(){implementation});
What would
implementation
be?the list and downloadlocation
this stuff
In general though:
1.
downloads
is an array, arrays cannot be added to, they're fixed size. You would need a list
2. Unless CoreSkse
and BugFixes
inherit from DownloadList
, no, you cannot do that
You can use a list, yesok, so I'd have to change it to a list?
And you can
.AddRange()
to add multiple elements to it
How you get those from your CoreSkse
and BugFixes
classes... up to you
Could be a property, could be a methodThey're just identifiers, for what settings are chosen in a UI
You can't write code that clearly instantiates a new class, and then just say "oh it's just an identifier"
I assume the code you send is what it is
yes