removed :) On Mon, Aug 27, 2012 at 2:53 PM, [email protected] <[email protected]> wrote: > Hi Maxim, > > there has been never a folder "files" created in the > ScopeApplicationAdapter.java. > > Take the Revision 1349461 from > https://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/src/org/openmeetings/app/remote/red5/ScopeApplicationAdapter.java?view=log > That is one commit before you added the OmFileHelper. > There is no create file or folder operation in > https://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/src/org/openmeetings/app/remote/red5/ScopeApplicationAdapter.java?revision=1349461&view=markup > > Does not matter anyhow. > Bottom line is: There is no use of that folder and it should be removed. > And the delete scheduler task should not check for "TEST_SETUP" files > in that directory but in subfolders as the 5 second test files are > written to: > webapps/openmeetings/streams/$roomId > > I agree that it might be better using getCanonicalPath compared to > getAbsolutePath. > But it does return the same as getAbsolutePath it just removes > duplicated or not necessary "." or "..". That is also written down in > the docs: > http://docs.oracle.com/javase/1.4.2/docs/api/java/io/File.html#getCanonicalPath%28%29 > The other refactoring is all fine and you should complete it by what > you think is necessary. We just need to make sure to test in detail > all features after you have done it. > > Sebastian > > 2012/8/27 Maxim Solodovnik <[email protected]>: >> 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 > > > > -- > Sebastian Wagner > https://twitter.com/#!/dead_lock > http://www.webbase-design.de > http://www.wagner-sebastian.com > [email protected]
-- WBR Maxim aka solomax
