cancel
Showing results for 
Search instead for 
Did you mean: 

The way to create directory for addon when bootstrap.

silversky
Champ on-the-rise
Champ on-the-rise

Hi.

I have a question about how to create a directory local to the server during bootstrap.

I am currently developing an add-on. I thought it would be more convenient to create a separate directory to do the work in that, so I want to create a directory when the add-on is deployed.

When you install and launch Alfresco Content Services for the first time, the following directories will be created first.

  • contentstore
  • contentstore.deleted

Is there a way to do this with add-ons?

1 ACCEPTED ANSWER

afaust
Legendary Innovator
Legendary Innovator

Addons typically do not have to do any work in the local server file system (apart from temporary files via the TempFilesProvider), it is quite uncommon for addons to create new directories on bootstrap, and as such, there is no common / standard way. Generally though, you'd just need to write a custom (Java) module component to create a directory using Java File API.

View answer in original post

2 REPLIES 2

afaust
Legendary Innovator
Legendary Innovator

Addons typically do not have to do any work in the local server file system (apart from temporary files via the TempFilesProvider), it is quite uncommon for addons to create new directories on bootstrap, and as such, there is no common / standard way. Generally though, you'd just need to write a custom (Java) module component to create a directory using Java File API.

silversky
Champ on-the-rise
Champ on-the-rise

Hi afaust

Thank you for your comment.

With your advice in mind, I was able to achieve my goal by creating a Module Component.