@Override
    public Path mkdir(final Path folder, final TransferStatus status) throws BackgroundException {
        try {
            if(containerService.isContainer(folder)) {
                final B2BucketResponse response = session.getClient().createBucket(containerService.getContainer(folder).getName(),
                        null == status.getRegion() ? BucketType.valueOf(new B2BucketTypeFeature(session, fileid).getDefault().getIdentifier()) : BucketType.valueOf(status.getRegion()));
                final EnumSet<Path.Type> type = EnumSet.copyOf(folder.getType());
                type.add(Path.Type.volume);
                return folder.withType(type).withAttributes(new B2AttributesFinderFeature(session, fileid).toAttributes(response));
            }
            else {
                final EnumSet<Path.Type> type = EnumSet.copyOf(folder.getType());
                type.add(Path.Type.placeholder);
                return new B2TouchFeature(session, fileid).touch(folder.withType(type), status
                        .withMime(MimeTypeService.DEFAULT_CONTENT_TYPE)
                        .withChecksum(writer.checksum(folder, status).compute(new NullInputStream(0L), status)));
            }
        }
        catch(B2ApiException e) {
            throw new B2ExceptionMappingService(fileid).map("Cannot create folder {0}", e, folder);
        }
        catch(IOException e) {
            throw new DefaultIOExceptionMappingService().map("Cannot create folder {0}", e, folder);
        }
    }
@Test
    public void testModificationDate() throws Exception {
        final Path bucket = new Path("/test-cyberduck", EnumSet.of(Path.Type.directory, Path.Type.volume));
        final TransferStatus status = new TransferStatus();
        final long timestamp = 1509959502930L;
        status.setModified(timestamp);
        final B2VersionIdProvider fileid = new B2VersionIdProvider(session);
        final Path directory = new B2DirectoryFeature(session, fileid, new B2WriteFeature(session, fileid)).mkdir(
                new Path(bucket, new AlphanumericRandomStringService().random(), EnumSet.of(Path.Type.directory)), status);
        assertEquals(timestamp, new B2AttributesFinderFeature(session, fileid).find(directory).getModificationDate());
        new B2DeleteFeature(session, fileid).delete(Collections.singletonList(directory), new DisabledLoginCallback(), new Delete.DisabledCallback());
    }