On 21.08.2014 17:11, Holger Schmeisky wrote: > Oh my.. OK for a v0.1 I would use plain files and advise the first > user not to use anything but plain file systems with IDEA. > The user will not get this right, believe me. Some users for example still fail to read the "files will get overwritten" warning. > Back to the original question: When I call project.getFile() and > create a plain io.File handle, it should work the same as for > eclipse.IFile, at least for "simple" file systems. > > Am 21.08.2014 15:00, schrieb Stefan Rossbach: >> Thanks Franz, >> >> and to be more specific ... >> >> You have to be VERY VERY careful with Java Files. >> >> Example: >> >> File a = new File("./foo/../Foo.bar"); >> File b = new File("Foo.bar"); >> >> System.out.println(a.getPath()); // -> .\foo\..\Foo.bar >> System.out.println(a.getAbsolutePath()); // -> >> Z:\java\eclipse\saros\Test\.\foo\..\Foo.bar >> // this call would actually also resolve symbolic links etc. >> System.out.println(a.getCanonicalPath()); // -> >> Z:\java\eclipse\saros\Test\Foo.bar >> >> System.out.println(b.getPath()); // -> Foo.bar >> System.out.println(b.getAbsolutePath()); // -> >> Z:\java\eclipse\saros\Test\Foo.bar >> System.out.println(b.getCanonicalPath()); // -> >> Z:\java\eclipse\saros\Test\Foo.bar >> >> System.out.println(a.equals(b)); // -> false ! >> >> >> >> On 21.08.2014 14:48, Zieris, Franz wrote: >>> Just to make this clear: >>> >>>> No, see GIT for example, >>>> My workspace is in Z:\java\eclipse\saros >>>> >>>> The relative workspace path inside Eclipse is: >>>> saros\src\...\SarosSession.java >>>> >>>> Unfortunately the absolute path is NOT: >>>> Z:\java\eclipse\saros\saros\src\...\SarosSession.java >>> This is not due to Git, but due to the Eclipse option of storing your >>> files outside the "default location", i.e. the workspace folder (plus >>> the possibility of having "linked files"). >>> But this does not weaken your point. >>> In fact, this should make clear that every Eclipse user (not only the >>> Git-infected ones) can be affected. >>> >>> Franz >>>
------------------------------------------------------------------------------ Slashdot TV. Video for Nerds. Stuff that matters. http://tv.slashdot.org/ _______________________________________________ DPP-Devel mailing list DPP-Devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dpp-devel