diff options
| author | Shlomo Hecht <shlomo@twine-s.com> | 2020-03-25 16:37:39 +0200 |
|---|---|---|
| committer | Shlomo Hecht <shlomo@twine-s.com> | 2020-03-25 16:37:39 +0200 |
| commit | 065bf199805406d21900e40d314154c92ec8e051 (patch) | |
| tree | 84c401ca3aa95d25cda019463b8b63275456c937 /Software/Visual_Studio/Tango.FileSystem/FileSystemManager.cs | |
| parent | e094952954ec5b1f643bc42581cfe46be15816e0 (diff) | |
| parent | 8f57d4962fa84499c8a153ebfff6e7766434ee1c (diff) | |
| download | Tango-065bf199805406d21900e40d314154c92ec8e051.tar.gz Tango-065bf199805406d21900e40d314154c92ec8e051.zip | |
Merge branch 'master' of https://twinetfs.visualstudio.com/Tango/_git/Tango
Diffstat (limited to 'Software/Visual_Studio/Tango.FileSystem/FileSystemManager.cs')
| -rw-r--r-- | Software/Visual_Studio/Tango.FileSystem/FileSystemManager.cs | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/Software/Visual_Studio/Tango.FileSystem/FileSystemManager.cs b/Software/Visual_Studio/Tango.FileSystem/FileSystemManager.cs index f72785f81..46ca080a2 100644 --- a/Software/Visual_Studio/Tango.FileSystem/FileSystemManager.cs +++ b/Software/Visual_Studio/Tango.FileSystem/FileSystemManager.cs @@ -181,5 +181,22 @@ namespace Tango.FileSystem throw new FileNotFoundException("Could not locate the source file or folder."); } } + + public FileSystemItemDTO CreateFolder(String path, String folderName) + { + String fullPath = Path.Combine(path, folderName); + + if (Directory.Exists(fullPath)) + { + throw new IOException("The specified directory name already exists."); + } + + Directory.CreateDirectory(fullPath); + + return GetFolder(new GetFileSystemItemRequest() + { + Path = fullPath + }); + } } } |
