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

TransferFile() static private method

static private TransferFile ( IActivityIOOperationsEndPoint src, IActivityIOOperationsEndPoint dst, Dev2CRUDOperationTO args, string path, IActivityIOPath p, bool result ) : bool
src IActivityIOOperationsEndPoint
dst IActivityIOOperationsEndPoint
args Dev2CRUDOperationTO
path string
p IActivityIOPath
result bool
return bool
        static bool TransferFile(IActivityIOOperationsEndPoint src, IActivityIOOperationsEndPoint dst, Dev2CRUDOperationTO args, string path, IActivityIOPath p, bool result)
        {
            var tmpPath = ActivityIOFactory.CreatePathFromString(path, dst.IOPath.Username, dst.IOPath.Password, true, dst.IOPath.PrivateKeyFile);
            var tmpEp = ActivityIOFactory.CreateOperationEndPointFromIOPath(tmpPath);
            var whereToPut = GetWhereToPut(src, dst);
            using(var s = src.Get(p, _filesToDelete))
            {
                if(tmpEp.Put(s, tmpEp.IOPath, args, whereToPut, _filesToDelete) < 0)
                {
                    result = false;
                }
                s.Close();
                s.Dispose();
            }
            return result;
        }