How can I create a folder on Android device, download from ftp-server video and save it there?
1 Answer
\$\begingroup\$
\$\endgroup\$
4
You can create directory in andriod
using System.IO.Directory.CreateDirectory(path)
string path = "/storage/emulated/0/MyFolder";
if(!Directory.Exists(path))
Directory.CreateDirectory(path);
and you can download any resource form the web using WWW.
-
\$\begingroup\$ Will it work on Android? \$\endgroup\$GuardFromUA– GuardFromUA2017-12-06 12:31:31 +00:00Commented Dec 6, 2017 at 12:31
-
\$\begingroup\$ yes try it first separately and let me know. \$\endgroup\$Muhammad Faizan Khan– Muhammad Faizan Khan2017-12-06 12:32:05 +00:00Commented Dec 6, 2017 at 12:32
-
\$\begingroup\$ Would this be a case where you want to use Application.persistentDataPath to help keep your app's saved files organized in a consistent spot? \$\endgroup\$2017-12-06 12:38:15 +00:00Commented Dec 6, 2017 at 12:38
-
\$\begingroup\$ @DMGregory Sorry docs.unity3d.com/ScriptReference/… is much better choice. \$\endgroup\$Muhammad Faizan Khan– Muhammad Faizan Khan2017-12-06 12:41:21 +00:00Commented Dec 6, 2017 at 12:41