create-directory

Wix: CustomAction to set Folder permissions

故事扮演 提交于 2021-01-28 06:22:12
问题 We're using WiX to bundle up our ASP.NET code into an MSI installer, and we need to set the [ComputerName]\IIS_WPG group to have modify permissions on a folder (named "CO") under the installation directory. The directory structure looks like this after install C:\inetpub\wwwroot\MyApp\CO The CO folder is actually part of the .NET solution file, and when the application is bundled into an MSI, the CO folder is included automatically because there are XML files underneath it which are marked as

add a directory when creating tar archive

末鹿安然 提交于 2020-06-12 08:00:07
问题 I want to tar some files (and directories) but want to create an additional directory those files should reside in. So for example for the following directory structure: myproject + file1 + file2 + subdir1 + file3 I cd into the myproject directory and want to create the tar archive tar czf myproject.tgz --place-into-dir myproject-1.0 file2 subdir1 to receive a tar archive with the following content: myproject-1.0 + file2 + subdir1 + file3 I am searching for an option like my fictional "-

Check if folder is there, if not create it on current user logged in VBS

痴心易碎 提交于 2020-01-31 07:03:04
问题 Currently this is my script Set oWS = WScript.CreateObject("WScript.Shell") ' Get the %userprofile% in a variable, or else it won't be recognized userProfile = oWS.ExpandEnvironmentStrings( "%userprofile%" ) What I am trying to do is grab the current user logged in, I want it to check the directory D:\"personsuser"\Appdata\Roaming\Local to see if the folder "Local" is created, if it isn't created I want to create one via createobject in vbs. The script above from what i know grabs the current

Google script: Download web image and save it in a specific drive folder

半城伤御伤魂 提交于 2020-01-23 12:34:53
问题 I need to download an image with GS and save it in a specific drive folder. I'm able to save the image in the root folder but i cannot save it in a specific folder: function downloadFile(fileURL,folder) { var fileName = ""; var fileSize = 0; var response = UrlFetchApp.fetch(fileURL, {muteHttpExceptions: true}); var rc = response.getResponseCode(); if (rc == 200) { var fileBlob = response.getBlob() var folder = DriveApp.getFoldersByName(folder); if (folder != null) { var file = DriveApp

Is CreateDirectory() in C# thread-safe?

妖精的绣舞 提交于 2020-01-22 11:17:44
问题 Can I safely attempt to create the same directory from two different threads, without having one of them throw an exception, or run into other issues? Note that according to MSDN, it is OK to call CreateDirectory() on a directory which already exists, in which case the method is expected to do nothing. 回答1: The Directory.CreateDirectory call itself is safe to make from multiple threads. It will not corrupt program or file system state if you do so. However it's not possible to call Directory

Is CreateDirectory() in C# thread-safe?

六眼飞鱼酱① 提交于 2020-01-22 11:17:30
问题 Can I safely attempt to create the same directory from two different threads, without having one of them throw an exception, or run into other issues? Note that according to MSDN, it is OK to call CreateDirectory() on a directory which already exists, in which case the method is expected to do nothing. 回答1: The Directory.CreateDirectory call itself is safe to make from multiple threads. It will not corrupt program or file system state if you do so. However it's not possible to call Directory

Is CreateDirectory() in C# thread-safe?

徘徊边缘 提交于 2020-01-22 11:17:16
问题 Can I safely attempt to create the same directory from two different threads, without having one of them throw an exception, or run into other issues? Note that according to MSDN, it is OK to call CreateDirectory() on a directory which already exists, in which case the method is expected to do nothing. 回答1: The Directory.CreateDirectory call itself is safe to make from multiple threads. It will not corrupt program or file system state if you do so. However it's not possible to call Directory

Is CreateDirectory() in C# thread-safe?

老子叫甜甜 提交于 2020-01-22 11:17:12
问题 Can I safely attempt to create the same directory from two different threads, without having one of them throw an exception, or run into other issues? Note that according to MSDN, it is OK to call CreateDirectory() on a directory which already exists, in which case the method is expected to do nothing. 回答1: The Directory.CreateDirectory call itself is safe to make from multiple threads. It will not corrupt program or file system state if you do so. However it's not possible to call Directory

.Net Core API running under docker

∥☆過路亽.° 提交于 2020-01-16 10:52:07
问题 I have a project (.Net Core API) which runs under Docker for windows and have service where customers can upload files. I want to save these files on the server (for example "C:\TempFolder") but when I running project in debug mode (with docker) and creating directory dynamically from code there is an error: 'System.IO.IOException: Invalid argument..." CurrentDirectory is /app and in DirectoryInfo FullPaths value is "/app/C:\TempFolder" when I running app without docker it works fine It may

Creating directories in medium trust environment?

守給你的承諾、 提交于 2019-12-20 06:24:54
问题 I've got an ASP.NET Web Application running in a medium trust environment with a shared hosting provider. The following code causes a SecurityException to be thrown: private void TestButton_Click(object sender, EventArgs e) { string directory = Server.MapPath("~/MyFolder/") + "_TestDirectory"; if (!Directory.Exists(directory)) Directory.CreateDirectory(directory); } The full text of the error is: System.Security.SecurityException: Request for the permission of type 'System.Security