Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Download save file path problem #75

Closed
LFMcxixif opened this issue Jan 17, 2022 · 6 comments
Closed

Download save file path problem #75

LFMcxixif opened this issue Jan 17, 2022 · 6 comments
Assignees
Labels
question Further information is requested

Comments

@LFMcxixif
Copy link

Does the file path saved after downloading have to use ""? , can't I use "/"?

@bezzad
Copy link
Owner

bezzad commented Jan 17, 2022

@LFMcxixif Can you explain more exactly what you mean?
Give your DownloadConfiguration to check what is your problem.

@bezzad bezzad self-assigned this Jan 17, 2022
@bezzad bezzad added the question Further information is requested label Jan 17, 2022
@LFMcxixif
Copy link
Author

LFMcxixif commented Jan 22, 2022

@LFMcxixif你能更准确地解释你的意思吗? 给你DownloadConfiguration检查你的问题是什么。

oh, I have something to do in the past two days and I didn't have to read your reply, sorry.

I would like to ask, is the path to save the downloaded file an absolute path or a relative path?
Which should I use for "/" and "\" in the path?

@bezzad
Copy link
Owner

bezzad commented Jan 22, 2022

The download path is absolute and dependent on the OS path system.
For example in Windows, you must give the path like this: C:\Temp\MyFolder\
But in Linux, you must give the path like this: /user/downloads/folder/

@LFMcxixif
Copy link
Author

The download path is absolute and dependent on the OS path system. For example in Windows, you must give the path like this: C:\Temp\MyFolder\ But in Linux, you must give the path like this: /user/downloads/folder/

Then I know, I have one last question, how to download files synchronously? instead of asynchronous downloads.

@bezzad
Copy link
Owner

bezzad commented Jan 22, 2022

So easy. you can call .Wait() after asynchronous methods to do sync mode. like below codes:

downloader.DownloadFileTaskAsync(url, path).Wait();

@LFMcxixif
Copy link
Author

So easy. you can call .Wait() after asynchronous methods to do sync mode. like below codes:

downloader.DownloadFileTaskAsync(url, path).Wait();

okay, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants