cancel
Showing results for 
Search instead for 
Did you mean: 

Azure FileX how to create directory with sub folders

Hab Collector
Associate III

I can use the fx_directory_create() api to create a single directory level.  However I cannot seem to create a directory with sub folders with a single call.  For example, I can create the directory "TestDirectory", but I cannot create "TestDirectory/Folder1".  The API example shows only a single level, but I could do such a thing with FAT FS f_mkdir() so the presumption is I can do this with fx_directory_create(), however all that I have tried have not work.  Can anyone tell me if this is possible and if so, what should the syntax be for the directory name string. 

 

Thanks,

Hab

1 ACCEPTED SOLUTION

Accepted Solutions

@Hab Collector wrote:

 I can create the directory "TestDirectory", but I cannot create "TestDirectory/Folder1". 


So do it as a 2-step process:

  1. create the upper directory "TestDirectory";
  2. create the subdirectory "Folder1" within the newly-created "TestDirectory"

 


@Hab Collector wrote:

I could do such a thing with FAT FS f_mkdir() so the presumption is I can do this with fx_directory_create(),


You can't just presume that; if Azure FileX only describes doing one level at a time, that's presumably the way you have to do it?

FatFs is an entirely different project by an entirely different author.

 

View solution in original post

1 REPLY 1

@Hab Collector wrote:

 I can create the directory "TestDirectory", but I cannot create "TestDirectory/Folder1". 


So do it as a 2-step process:

  1. create the upper directory "TestDirectory";
  2. create the subdirectory "Folder1" within the newly-created "TestDirectory"

 


@Hab Collector wrote:

I could do such a thing with FAT FS f_mkdir() so the presumption is I can do this with fx_directory_create(),


You can't just presume that; if Azure FileX only describes doing one level at a time, that's presumably the way you have to do it?

FatFs is an entirely different project by an entirely different author.