- Notifications
You must be signed in to change notification settings - Fork Insta Story Ideas For Girls
Research Article In A Newspaper
bluesalm0n diana pragmata pragmata highres 1girl barefoot
New issue
Bluesalm0n diana pragmata pragmata highres 1girl barefoot Have a question about this project? Sign up for a free CloneAGC account to open an issue and contact its maintainers and the community. Instagram Post Draft
Research Article In A Newspaper By clicking “Sign up for CloneAGC”, you agree to our Mom/Dad Birthday Story Idea For Instagram and Cash Reward Credit Cards. We’ll occasionally send you account related emails. Instagram Post Size Chart
Simple Organizational Chart Template Already on CloneAGC? How To Present A Journal Article to your account Examples To Display Product
How To Run Your Family Calendar For Apple Research Article In A Newspaper
How To Credit A Blog Post
How To Run Your Family Calendar For Apple Calendar There was an error while loading. Asnb Product Highlight Sheet. Great Examples Of Email Signatures
Research Article In A Newspaper
bluesalm0n diana pragmata pragmata highres 1girl barefoot
Changes from 3 commits
4fa34ab 6c87593 d67c294 657062c 7004c21 File filter
Mac OS Font Research Article In A Newspaper
Conversations
Clever Instagram Story Idea For Events Research Article In A Newspaper
Mac OS Font
Clever Instagram Story Idea For Events There was an error while loading. Product Launch Event Save The Date. How Do I Read Resources From An Academic Journal
Jump to
Content For Insta Post Clothing Research Article In A Newspaper
Content For Insta Post Clothing
All Credit Cards There was an error while loading. How To Post IG Story Using Laptop. USAA Platinum Visa Credit Card
Diff view
Diff view
All Credit Cards Research Article In A Newspaper
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,42 @@ | ||
| // Licensed to the .NET Foundation under one or more agreements. | ||
| // The .NET Foundation licenses this file to you under the MIT license. | ||
| | ||
| namespace Aspire.Cli.Utils; | ||
| | ||
| /// <summary> | ||
| /// Helper class for file system operations. | ||
| /// </summary> | ||
| internal static class FileSystemHelper | ||
| { | ||
| /// <summary> | ||
| /// Copies an entire directory and its contents to a new location. | ||
| /// </summary> | ||
| mitchdenny marked this conversation as resolved. Ayuvedic Product Post Research Article In A NewspaperBlogs Writting What We Do Website Pages There was an error while loading. What To Write In A Blog. Business Christmas Cards With Logo | ||
| internal static void CopyDirectory(string sourceDir, string destinationDir) | ||
| mitchdenny marked this conversation as resolved. Blogs Writting Research Article In A NewspaperSteps Of How To Write An Article Microsoft Word Concept Map Template There was an error while loading. Compare Travel Credit Cards. Happy Birthday Card Cover | ||
| { | ||
| ArgumentException.ThrowIfNullOrEmpty(sourceDir); | ||
| ArgumentException.ThrowIfNullOrEmpty(destinationDir); | ||
| | ||
| var sourceDirInfo = new DirectoryInfo(sourceDir); | ||
| if (!sourceDirInfo.Exists) | ||
| { | ||
| throw new DirectoryNotFoundException($"Source directory not found: {sourceDir}"); | ||
| } | ||
| | ||
| // Create the destination directory if it doesn't exist | ||
| Directory.CreateDirectory(destinationDir); | ||
| | ||
| // Copy all files in the current directory | ||
| foreach (var file in sourceDirInfo.GetFiles()) | ||
| { | ||
| var targetFilePath = Path.Combine(destinationDir, file.Name); | ||
| file.CopyTo(targetFilePath, overwrite: false); | ||
| } | ||
| | ||
| // Recursively copy all subdirectories | ||
| foreach (var subDir in sourceDirInfo.GetDirectories()) | ||
| { | ||
| var targetSubDir = Path.Combine(destinationDir, subDir.Name); | ||
| CopyDirectory(subDir.FullName, targetSubDir); | ||
| } | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,202 @@ | ||
| // Licensed to the .NET Foundation under one or more agreements. | ||
| // The .NET Foundation licenses this file to you under the MIT license. | ||
| | ||
| using Aspire.Cli.Utils; | ||
| | ||
| namespace Aspire.Cli.Tests.Utils; | ||
| | ||
| public class FileSystemHelperTests(ITestOutputHelper outputHelper) | ||
| { | ||
| [Fact] | ||
| public void CopyDirectory_WithSimpleFiles_CopiesAllFiles() | ||
| { | ||
| // Arrange | ||
| using var workspace = TemporaryWorkspace.Create(outputHelper); | ||
| var sourceDir = workspace.CreateDirectory("source"); | ||
| var destDir = Path.Combine(workspace.WorkspaceRoot.FullName, "destination"); | ||
| | ||
| // Create some test files | ||
| File.WriteAllText(Path.Combine(sourceDir.FullName, "file1.txt"), "content1"); | ||
| File.WriteAllText(Path.Combine(sourceDir.FullName, "file2.txt"), "content2"); | ||
| File.WriteAllText(Path.Combine(sourceDir.FullName, "file3.cs"), "using System;"); | ||
| | ||
| // Act | ||
| FileSystemHelper.CopyDirectory(sourceDir.FullName, destDir); | ||
| | ||
| // Assert | ||
| Assert.True(Directory.Exists(destDir)); | ||
| Assert.True(File.Exists(Path.Combine(destDir, "file1.txt"))); | ||
| Assert.True(File.Exists(Path.Combine(destDir, "file2.txt"))); | ||
| Assert.True(File.Exists(Path.Combine(destDir, "file3.cs"))); | ||
| | ||
| Assert.Equal("content1", File.ReadAllText(Path.Combine(destDir, "file1.txt"))); | ||
| Assert.Equal("content2", File.ReadAllText(Path.Combine(destDir, "file2.txt"))); | ||
| Assert.Equal("using System;", File.ReadAllText(Path.Combine(destDir, "file3.cs"))); | ||
| } | ||
| | ||
| [Fact] | ||
| public void CopyDirectory_WithSubdirectories_CopiesRecursively() | ||
| { | ||
| // Arrange | ||
| using var workspace = TemporaryWorkspace.Create(outputHelper); | ||
| var sourceDir = workspace.CreateDirectory("source"); | ||
| var destDir = Path.Combine(workspace.WorkspaceRoot.FullName, "destination"); | ||
| | ||
| // Create nested directory structure | ||
| var subDir1 = sourceDir.CreateSubdirectory("subdir1"); | ||
| var subDir2 = subDir1.CreateSubdirectory("subdir2"); | ||
| | ||
| File.WriteAllText(Path.Combine(sourceDir.FullName, "root.txt"), "root content"); | ||
| File.WriteAllText(Path.Combine(subDir1.FullName, "level1.txt"), "level 1 content"); | ||
| File.WriteAllText(Path.Combine(subDir2.FullName, "level2.txt"), "level 2 content"); | ||
| | ||
| // Act | ||
| FileSystemHelper.CopyDirectory(sourceDir.FullName, destDir); | ||
| | ||
| // Assert | ||
| Assert.True(Directory.Exists(destDir)); | ||
| Assert.True(File.Exists(Path.Combine(destDir, "root.txt"))); | ||
| Assert.True(Directory.Exists(Path.Combine(destDir, "subdir1"))); | ||
| Assert.True(File.Exists(Path.Combine(destDir, "subdir1", "level1.txt"))); | ||
| Assert.True(Directory.Exists(Path.Combine(destDir, "subdir1", "subdir2"))); | ||
| Assert.True(File.Exists(Path.Combine(destDir, "subdir1", "subdir2", "level2.txt"))); | ||
| | ||
| Assert.Equal("root content", File.ReadAllText(Path.Combine(destDir, "root.txt"))); | ||
| Assert.Equal("level 1 content", File.ReadAllText(Path.Combine(destDir, "subdir1", "level1.txt"))); | ||
| Assert.Equal("level 2 content", File.ReadAllText(Path.Combine(destDir, "subdir1", "subdir2", "level2.txt"))); | ||
| } | ||
| | ||
| [Fact] | ||
| public void CopyDirectory_WithEmptyDirectory_CreatesDestination() | ||
| { | ||
| // Arrange | ||
| using var workspace = TemporaryWorkspace.Create(outputHelper); | ||
| var sourceDir = workspace.CreateDirectory("empty_source"); | ||
| var destDir = Path.Combine(workspace.WorkspaceRoot.FullName, "empty_destination"); | ||
| | ||
| // Act | ||
| FileSystemHelper.CopyDirectory(sourceDir.FullName, destDir); | ||
| | ||
| // Assert | ||
| Assert.True(Directory.Exists(destDir)); | ||
| Assert.Empty(Directory.GetFiles(destDir)); | ||
| Assert.Empty(Directory.GetDirectories(destDir)); | ||
| } | ||
| | ||
| [Fact] | ||
| public void CopyDirectory_WithNonExistentSource_ThrowsDirectoryNotFoundException() | ||
| { | ||
| // Arrange | ||
| using var workspace = TemporaryWorkspace.Create(outputHelper); | ||
| var nonExistentSource = Path.Combine(workspace.WorkspaceRoot.FullName, "nonexistent"); | ||
| var destDir = Path.Combine(workspace.WorkspaceRoot.FullName, "destination"); | ||
| | ||
| // Act & Assert | ||
| Assert.Throws<DirectoryNotFoundException>(() => | ||
| FileSystemHelper.CopyDirectory(nonExistentSource, destDir)); | ||
| } | ||
| | ||
| [Fact] | ||
| public void CopyDirectory_WithNullSource_ThrowsArgumentNullException() | ||
| { | ||
| // Arrange | ||
| using var workspace = TemporaryWorkspace.Create(outputHelper); | ||
| var destDir = Path.Combine(workspace.WorkspaceRoot.FullName, "destination"); | ||
| | ||
| // Act & Assert | ||
| Assert.Throws<ArgumentNullException>(() => | ||
| FileSystemHelper.CopyDirectory(null!, destDir)); | ||
| } | ||
| | ||
| [Fact] | ||
| public void CopyDirectory_WithNullDestination_ThrowsArgumentNullException() | ||
| { | ||
| // Arrange | ||
| using var workspace = TemporaryWorkspace.Create(outputHelper); | ||
| var sourceDir = workspace.CreateDirectory("source"); | ||
| | ||
| // Act & Assert | ||
| Assert.Throws<ArgumentNullException>(() => | ||
| FileSystemHelper.CopyDirectory(sourceDir.FullName, null!)); | ||
| } | ||
| | ||
| [Fact] | ||
| public void CopyDirectory_WithEmptySource_ThrowsArgumentException() | ||
| { | ||
| // Arrange | ||
| using var workspace = TemporaryWorkspace.Create(outputHelper); | ||
| var destDir = Path.Combine(workspace.WorkspaceRoot.FullName, "destination"); | ||
| | ||
| // Act & Assert | ||
| Assert.Throws<ArgumentException>(() => | ||
| FileSystemHelper.CopyDirectory(string.Empty, destDir)); | ||
| } | ||
| | ||
| [Fact] | ||
| public void CopyDirectory_WithEmptyDestination_ThrowsArgumentException() | ||
| { | ||
| // Arrange | ||
| using var workspace = TemporaryWorkspace.Create(outputHelper); | ||
| var sourceDir = workspace.CreateDirectory("source"); | ||
| | ||
| // Act & Assert | ||
| Assert.Throws<ArgumentException>(() => | ||
| FileSystemHelper.CopyDirectory(sourceDir.FullName, string.Empty)); | ||
| } | ||
| | ||
| [Fact] | ||
| public void CopyDirectory_PreservesFileContent_WithBinaryFiles() | ||
| { | ||
| // Arrange | ||
| using var workspace = TemporaryWorkspace.Create(outputHelper); | ||
| var sourceDir = workspace.CreateDirectory("source"); | ||
| var destDir = Path.Combine(workspace.WorkspaceRoot.FullName, "destination"); | ||
| | ||
| // Create a binary file with random content | ||
| var binaryFilePath = Path.Combine(sourceDir.FullName, "binary.dat"); | ||
| var randomBytes = new byte[1024]; | ||
| Random.Shared.NextBytes(randomBytes); | ||
| File.WriteAllBytes(binaryFilePath, randomBytes); | ||
| | ||
| // Act | ||
| FileSystemHelper.CopyDirectory(sourceDir.FullName, destDir); | ||
| | ||
| // Assert | ||
| var copiedFilePath = Path.Combine(destDir, "binary.dat"); | ||
| Assert.True(File.Exists(copiedFilePath)); | ||
| | ||
| var copiedBytes = File.ReadAllBytes(copiedFilePath); | ||
| Assert.Equal(randomBytes, copiedBytes); | ||
| } | ||
| | ||
| [Fact] | ||
| public void CopyDirectory_WithMultipleLevelsOfSubdirectories_CopiesAll() | ||
| { | ||
| // Arrange | ||
| using var workspace = TemporaryWorkspace.Create(outputHelper); | ||
| var sourceDir = workspace.CreateDirectory("source"); | ||
| var destDir = Path.Combine(workspace.WorkspaceRoot.FullName, "destination"); | ||
| | ||
| // Create a deep directory structure | ||
| var current = sourceDir; | ||
| for (int i = 0; i < 5; i++) | ||
| { | ||
| current = current.CreateSubdirectory($"level{i}"); | ||
| File.WriteAllText(Path.Combine(current.FullName, $"file{i}.txt"), $"content at level {i}"); | ||
| } | ||
| | ||
| // Act | ||
| FileSystemHelper.CopyDirectory(sourceDir.FullName, destDir); | ||
| | ||
| // Assert | ||
| var currentDest = destDir; | ||
| for (int i = 0; i < 5; i++) | ||
| { | ||
| currentDest = Path.Combine(currentDest, $"level{i}"); | ||
| Assert.True(Directory.Exists(currentDest)); | ||
| var filePath = Path.Combine(currentDest, $"file{i}.txt"); | ||
| Assert.True(File.Exists(filePath)); | ||
| Assert.Equal($"content at level {i}", File.ReadAllText(filePath)); | ||
| } | ||
| } | ||
| } |
What We Do Website Pages Research Article In A Newspaper
Product Launch Email Credit Card Template
Instagram Template For Product There was an error while loading. Bank Of America Card Change. Mind Map Template Word Download
Minted Weddings Research Article In A Newspaper
Minted Weddings
Ayuvedic Product Post There was an error while loading. New Product Launch EDM Tagline. Product Road Map Steps