create-directory

How to create a folder in C (need to run on both Linux and Windows)

对着背影说爱祢 提交于 2019-12-19 03:15:32
问题 I don't have much experience and I'm on a C project where I need to create & delete folders and the program must run on both Linux and Windows. I saw few solutions but all were either for Windows or Linux but none for both and most uses system(...). Also, if there is an easy way to delete a folder with it's contents, I'm interrested (for the moment I delete each files one by one and then the folder with remove(...)) Thanks in advance. 回答1: Here is a common 'create directory' method: void make

Android - Creating a folder in the data/data/pkg/files directory

女生的网名这么多〃 提交于 2019-12-18 13:23:04
问题 Referencing this question: How to create files hierarchy in Androids '/data/data/pkg/files' directory? What kind of a solution is there to this problem using the built in standard Java libraries, how do I navigate to the data/data/pkg directory and create folders and files in there? Maybe using some of the Android calls where possible? When a user uses my app I wish to save any files associated with that user in a folder pkg/files/username, so that I can easily read these folders later. My

WiX Permissions, how do I express 'Modify' in terms of DACL flags

三世轮回 提交于 2019-12-12 09:43:08
问题 I'm attempting to apply custom rights to a folder as part of a WiX 3.0.4318.0 installer. In terms of the Security properties UI in explorer, I want to add Modify to the rights for BUILTIN\Users. Obviously it needs to be resilient against localisation of the user name. So based on my research to date, I want at least: <CreateFolder Directory="XYZ" > <PermissionEx User="[WIX_ACCOUNT_USERS]" GenericRead="yes" GenericWrite="yes" Delete="Yes" /> </CreateFolder> Questions: I'm doing this in a

How to create a folder within S3 bucket using PHP

大兔子大兔子 提交于 2019-12-12 03:39:06
问题 I'm trying to create a folder within an S3 amazon bucket but I'm finding it difficult to find the right documentation to adequately explain what is needed. I have the following code / pseudocode for creating a folder. Can anyone explain or provide a sample of the arguments I need to place within the code use vendor\aws\S3\S3Client; $bucket_url = 'https://***.amazonaws.com/***/'; $folder_name = $username . '/'; $s3Client = new vendor\aws\S3\S3Client([ 'version' => AWS_VERSION, 'region' => AWS

CreateDirectory at server in a shared machine

。_饼干妹妹 提交于 2019-12-12 01:59:56
问题 I have an ASP.NET application running over a shared .NET server. I want to allow the current logged user to create a folder into a specific path when the application needs it. So, I'm just checking the following: var userFolderPath = Path.Combine(Server.MapPath("~/storedphotos"), username); if (!Directory.Exists(userFolderPath)) { Directory.Create(userFolderPath); } When I run this code into my local machine it works perfectly. However, when I publish the application to that server and try to

Programatically create directory for new user on web site

南楼画角 提交于 2019-12-11 06:49:38
问题 I just uploaded my site to Go Daddy and have code that creates a directory dynamically based on a user id when the user creates an account on my site. It's not creating the directory so I suppose I need to set permissions in some way but I don't have control over IIS since my site's being hosted. How do I programatically set permissions? if(Directory.Exists(path)) return true; try { Directory.CreateDirectory(path); } 回答1: You can create a file/sub directory only within the root web directory

Can't find directory created by using sqlplus console

那年仲夏 提交于 2019-12-10 14:54:19
问题 I created a directory using SQLPlus console but I cant find it on file system. Here is the command I used: SQL> create directory secfile as ’/opt/oracle’; Directory created. I have looked in my Oracle home directory( C:\Program Files (x86)\Oracle ) but there is no 'images' folder. Where should I look for it? I'm using Oracle 11g Data Base(installed on my C drive) and I need this directory to store pictures which I will be further storing in the data base. I was following a tutorial about

How to create folder with trailing dot (.) in .NET/C#?

末鹿安然 提交于 2019-12-07 22:37:58
问题 I need to create folders with trailing dots (.) using C#. Here is my code: System.IO.Directory.CreateDirectory("d:\\MyCorp Inc."); But the folder is created without the final dot. Is there a solution? I am using .NET Framework 4.5/C#. My file system is NTFS, on Windows 8. 回答1: Try: using System.Runtime.InteropServices; class Program { [DllImport("kernel32.dll", SetLastError = true)] public static extern bool CreateDirectory(string lpPathName, IntPtr lpSecurityAttributes); private static void

How to create folder with trailing dot (.) in .NET/C#?

不打扰是莪最后的温柔 提交于 2019-12-06 13:43:28
I need to create folders with trailing dots (.) using C#. Here is my code: System.IO.Directory.CreateDirectory("d:\\MyCorp Inc."); But the folder is created without the final dot. Is there a solution? I am using .NET Framework 4.5/C#. My file system is NTFS, on Windows 8. Keith Nicholas Try: using System.Runtime.InteropServices; class Program { [DllImport("kernel32.dll", SetLastError = true)] public static extern bool CreateDirectory(string lpPathName, IntPtr lpSecurityAttributes); private static void Main(string[] args) { CreateDirectory(@"\\?\c:\temp\MyCorp Inc.", IntPtr.Zero); } And refer

WiX Permissions, how do I express 'Modify' in terms of DACL flags

跟風遠走 提交于 2019-12-05 16:33:27
I'm attempting to apply custom rights to a folder as part of a WiX 3.0.4318.0 installer. In terms of the Security properties UI in explorer, I want to add Modify to the rights for BUILTIN\Users. Obviously it needs to be resilient against localisation of the user name. So based on my research to date, I want at least: <CreateFolder Directory="XYZ" > <PermissionEx User="[WIX_ACCOUNT_USERS]" GenericRead="yes" GenericWrite="yes" Delete="Yes" /> </CreateFolder> Questions: I'm doing this in a subdirectory - am I correct in assuming that the choice between Permission and PermissionEx is Moot? What