Dev2.PathOperations.Dev2ActivityIOBroker.MoveTmpFileToDestination C# (CSharp) Method

MoveTmpFileToDestination() private method

private MoveTmpFileToDestination ( IActivityIOOperationsEndPoint dst, string tmp, string result ) : string
dst IActivityIOOperationsEndPoint
tmp string
result string
return string
        string MoveTmpFileToDestination(IActivityIOOperationsEndPoint dst, string tmp, string result)
        {
            using(Stream s = new MemoryStream(File.ReadAllBytes(tmp)))
            {
                Dev2CRUDOperationTO newArgs = new Dev2CRUDOperationTO(true);

                //MO : 22-05-2012 : If the file doesnt exist then create the file
                if(!dst.PathExist(dst.IOPath))
                {
                    CreateEndPoint(dst, newArgs, true);
                }
                if(dst.Put(s, dst.IOPath, newArgs, null, _filesToDelete) < 0)
                {
                    result = ResultBad;
                }
            }
            return result;
        }