Hi!
I hope this is the right section for this question:
I need to download a video file in the Streaming Assets folder from another PC in LAN.
IEnumerator ImportVideo () {
using (WWW www = new WWW ("http://192.168.2.244/VideoInterface/video/1.mp4")) {
yield return www;
if (www.error != null) {
Debug.Log (www.error);
} else {
string write_path = Application.dataPath + "/StreamingAssets/Video/1.mp4";
System.IO.File.WriteAllBytes (write_path, www.bytes);
}
}
}
I’ve no problem with this but now I want to check if the file is already in the directory. In that case I don’t want to download it. Is it possible? I thought about checking the name and the size but I can’t find a way to check the size…