Example #1
0
        private static async Task <Item> CreateOneDriveTestDirectory(TokenResponse currentToken, string name)
        {
            using (OneDriveClient client = new OneDriveClient(currentToken))
            {
                // Get the default drive
                Drive drive = await client.GetDefaultDrive().ConfigureAwait(false);

                // Get the 'Testing' folder under the default drive
                Item testingFolder = await client.GetOrCreateFolderAsync(drive, "Testing");

                // Create the unique folder under the 'Testing' folder
                return(await client.CreateFolderAsync(testingFolder, name));
            }
        }