Hello Sebastian,

While creating OmFileHelper I tried to:
1) move all file related operations to 1 place, to reduce "double
coding" of similar operations (like recursive file deletions etc.)
2) replace all string concatenations with "new File(parent, child)" as
more straight forward way of doing things
3) improve command line admin with ability to overview disk usage and
cleanup capability
4) change as less logic as possible.

unfortunately these changes affects almost all code and I seems to
fail with 4) above :(.

Since folders were created by different parts of code and there is no
documentation on it I run Om perform "file" operations: Upload
pictures, files, perform recordings etc. I tried to "guess" purpose of
folders.

Right now it is possible to add comments to OmFileHelper to avoid such
situations in the future.

"files" folder was creates in ScopeApplicationAdapter so I did move it
to OmFileHelper.
please let me know if it should be removed.

Additionally I would like to:
1) add "wml" folder to OmFileHelper (currently is created separately)
2) remove all uses of File.getAbsolutePath in favor of
File.getCanonicalPath (which is both absolute and unique according to
the documentation and from my point of view is preferable)
3) get rid of string concatenations using File.separatorChar since it
makes code less readable. In my opinion we should operate files not
strings.


On Sat, Aug 25, 2012 at 7:07 PM, [email protected]
<[email protected]> wrote:
> Hi Maxim,
>
> there is a strange file operation,
> as soon as the server starts up it does create a folder in
> /webapps/openmeetings/streams called "files".
> This folder is not needed from my point of view.
> I guess it happens since the rework with the OmFileHelper.java
>
> I guess OmFileHelper.java
> Method:
> public static File getStreamsFilesDir() {
>                 return getDir(getStreamsDir(), FILES_DIR);
>         }
>
> does create it.
> This file reference is only used in:
> TestSetupCleanupJob.java
>
> I don't understand both of it.
> What is the folder /webapps/openmeetings/streams/files good for?
> And what files do you expect to be in that folder?
> If you record a 5-second test before entering the room, this 5 second
> files are in
> /webapps/openmeetings/streams/$roomId/*
>
> TestSetupCleanupJob should actually scan all sub folders of "streams"
> and check for files that match the "TEST_SETUP" pattern.
>
> Sebastian
> --
> Sebastian Wagner
> https://twitter.com/#!/dead_lock
> http://www.webbase-design.de
> http://www.wagner-sebastian.com
> [email protected]



-- 
WBR
Maxim aka solomax

Reply via email to