snow_zhangy Posted March 7, 2014 Posted March 7, 2014 hi: i am trying to write a assets collection tool in usc to collect all assets in one level. Now i need copy the asset to another dir. Anyone know how? Once i finished the tool, will share. Thanks Yang
ulf.schroeter Posted March 7, 2014 Posted March 7, 2014 Using File class and readStream() should do the trick. Something like (fully untested) File source = new File(<sourcepathname>, "rb"); File copy = new File(<copypathname>, "wb"); source.readStream( copy, source.getSize() ); source.close(); copy.close();
snow_zhangy Posted March 7, 2014 Author Posted March 7, 2014 if this is the only option. I hope this copy feature could be added in to the core library. Another workaround way is the engine could have a external command call. in this way i can call another standalone os app from the engine.
ulf.schroeter Posted March 7, 2014 Posted March 7, 2014 https://developer.unigine.com/en/docs/1.0/scripting/core/os#system_string
Recommended Posts