@Test public void testDefaultLocalPathDriveLetterBackwardSlashes() { assertEquals(new Path("/C:/Users/example/Documents/vault", EnumSet.of(Path.Type.directory)), new DefaultHomeFinderService(null).find(new Path("/", EnumSet.of(Path.Type.directory)), "C:\\Users\\example\\Documents\\vault")); }
@Override public Path find() throws BackgroundException { final Host host = session.getHost(); if(host.getWorkdir() != null) { return new PathDictionary().deserialize(host.getWorkdir().serialize(SerializerFactory.get())); } else { final String path = host.getDefaultPath(); if(StringUtils.isNotBlank(path)) { return this.find(DEFAULT_HOME, path); } else { return DEFAULT_HOME; } } }
DefaultHomeFinderService implements Home { @Override public Path find() throws BackgroundException { final Host host = session.getHost(); if(host.getWorkdir() != null) { return new PathDictionary().deserialize(host.getWorkdir().serialize(SerializerFactory.get())); } else { final String path = host.getDefaultPath(); if(StringUtils.isNotBlank(path)) { return this.find(DEFAULT_HOME, path); } else { return DEFAULT_HOME; } } } }
DefaultHomeFinderService implements Home { @Override public Path find() throws BackgroundException { final Host host = session.getHost(); if(host.getWorkdir() != null) { return new PathDictionary().deserialize(host.getWorkdir().serialize(SerializerFactory.get())); } else { final String path = host.getDefaultPath(); if(StringUtils.isNotBlank(path)) { return this.find(DEFAULT_HOME, path); } else { return DEFAULT_HOME; } } } DefaultHomeFinderService(final Session session); }
DefaultHomeFinderService implements Home { @Override public Path find() throws BackgroundException { final Host host = session.getHost(); if(host.getWorkdir() != null) { return new PathDictionary().deserialize(host.getWorkdir().serialize(SerializerFactory.get())); } else { final String path = host.getDefaultPath(); if(StringUtils.isNotBlank(path)) { return this.find(DEFAULT_HOME, path); } else { return DEFAULT_HOME; } } } DefaultHomeFinderService(final Session session); @Override Path find(); @Override Path find(final Path root, final String path); }
DefaultHomeFinderService implements Home { @Override public Path find() throws BackgroundException { final Host host = session.getHost(); if(host.getWorkdir() != null) { return new PathDictionary().deserialize(host.getWorkdir().serialize(SerializerFactory.get())); } else { final String path = host.getDefaultPath(); if(StringUtils.isNotBlank(path)) { return this.find(DEFAULT_HOME, path); } else { return DEFAULT_HOME; } } } DefaultHomeFinderService(final Session session); @Override Path find(); @Override Path find(final Path root, final String path);  }