A requirement like this isn't something you'll find in the OneStream docs. I would use the SharePoint REST API to access and transfer files. Here's something to get you started. You'll need some familiarity with asynchronous operations also.
using System.Net.Http.Headers;
public async Task DownloadSharePointFileAsync(string siteUrl, string serverRelativeFilePath, string localFilePath, string accessToken)
{
using var client = new HttpClient();
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", accessToken);
var encodedPath = Uri.EscapeDataString(serverRelativeFilePath);
var requestUrl = $"{siteUrl}/_api/web/getfilebyserverrelativeurl('{encodedPath}')/$value";
using var response = await client.GetAsync(requestUrl);
response.EnsureSuccessStatusCode();
using var fileStream = File.Create(localFilePath);
await response.Content.CopyToAsync(fileStream);
}
//Example
string siteUrl = "https://yourtenant.sharepoint.com/sites/yoursite";
string filePath = "/sites/yoursite/Shared Documents/Report.xlsx";
string localPath = "C:\\Downloads\\Report.xlsx";
string token = await GetAccessTokenAsync(); // Your own token retrieval method
await DownloadSharePointFileAsync(siteUrl, filePath, localPath, token);