Dev2.Data.PathOperations.Dev2FTPProvider.CreateDirectory C# (CSharp) Method

CreateDirectory() public method

public CreateDirectory ( IActivityIOPath dst, Dev2CRUDOperationTO args ) : bool
dst IActivityIOPath
args Dev2.PathOperations.Dev2CRUDOperationTO
return bool
        public bool CreateDirectory(IActivityIOPath dst, Dev2CRUDOperationTO args)
        {
            bool result = false;

            bool ok;

            if(args.Overwrite)
            {
                // delete if it already present
                if(IsDirectoryAlreadyPresent(dst))
                {
                    Delete(dst);
                }
                ok = true;
            }
            else
            {
                // does not exist, ok to create
                ok = !IsDirectoryAlreadyPresent(dst);
            }

            if(ok)
            {

                result = IsStandardFtp(dst) ? CreateDirectoryStandardFtp(dst) : CreateDirectorySftp(dst);
            }
            return result;
        }