The way to create directory for addon when bootstrap.

cancel
Showing results for 
Search instead for 
Did you mean: 
silversky
Partner

The way to create directory for addon when bootstrap.

Jump to solution

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 Solution

Accepted Solutions
afaust
Master

Re: The way to create directory for addon when bootstrap.

Jump to solution

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 solution in original post

2 Replies
afaust
Master

Re: The way to create directory for addon when bootstrap.

Jump to solution

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
Partner

Re: The way to create directory for addon when bootstrap.

Jump to solution

Hi afaust

Thank you for your comment.

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