@Override
    public void touch(final Local file) throws AccessDeniedException {
        try {
            try {
                Files.createFile(Paths.get(file.getAbsolute()));
            }
            catch(NoSuchFileException e) {
                final Local parent = file.getParent();
                new DefaultLocalDirectoryFeature().mkdir(parent);
                if(log.isDebugEnabled()) {
                    log.debug(String.format("Created folder %s", parent));
                }
                Files.createFile(Paths.get(file.getAbsolute()));
            }
            catch(FileAlreadyExistsException e) {
                log.warn(String.format("File %s already exists", file));
                throw new LocalAccessDeniedException(MessageFormat.format(
                        LocaleFactory.localizedString("Cannot create {0}", "Error"), file.getAbsolute()), e);
            }
        }
        catch(IOException e) {
            throw new LocalAccessDeniedException(MessageFormat.format(
                LocaleFactory.localizedString("Cannot create {0}", "Error"), file.getAbsolute()), e);
        }
        if(log.isDebugEnabled()) {
            log.debug(String.format("Created file %s", file));
        }
    }
@Test
    public void testFailure() {
        Local l = new Local("/" + UUID.randomUUID().toString());
        final DefaultLocalTouchFeature f = new DefaultLocalTouchFeature();
        try {
            f.touch(l);
        }
        catch(AccessDeniedException e) {
            final String s = l.getName();
            assertEquals("Cannot create " + PreferencesFactory.get().getProperty("local.delimiter") + s + ". Please verify disk permissions.", e.getDetail());
            assertEquals("Access denied", e.getMessage());
        }
    }