@ExecuteOn(TaskExecutors.IO)
    @Post(uri = "{namespace}/files/directory")
    @Operation(tags = {"Files"}, summary = "Create a directory")
    public void createDirectory(
        @Parameter(description = "The namespace id") @PathVariable String namespace,
        @Parameter(description = "The internal storage uri") @Nullable @QueryValue URI path
    ) throws IOException, URISyntaxException {
        forbiddenPathsGuard(path);

        storageInterface.createDirectory(tenantService.resolveTenant(), NamespaceFile.of(namespace, path).uri());
    }
@Test
    void createFile_ExtractZip() throws IOException {
        String namespaceToExport = "io.kestra.tests";

        storageInterface.put(null, toNamespacedStorageUri(namespaceToExport, URI.create("/file.txt")), new ByteArrayInputStream("file".getBytes()));
        storageInterface.put(null, toNamespacedStorageUri(namespaceToExport, URI.create("/another_file.txt")), new ByteArrayInputStream("another_file".getBytes()));
        storageInterface.put(null, toNamespacedStorageUri(namespaceToExport, URI.create("/folder/file.txt")), new ByteArrayInputStream("folder_file".getBytes()));
        storageInterface.createDirectory(null, toNamespacedStorageUri(namespaceToExport, URI.create("/empty_folder")));

        byte[] zip = client.toBlocking().retrieve(HttpRequest.GET("/api/v1/namespaces/" + namespaceToExport + "/files/export"),
            Argument.of(byte[].class));
        File temp = File.createTempFile("files", ".zip");
        Files.write(temp.toPath(), zip);

        assertThat(flowRepository.findById(null, NAMESPACE, "task-flow").isEmpty(), is(true));

        MultipartBody body = MultipartBody.builder()
            .addPart("fileContent", "files.zip", temp)
            .build();
        client.toBlocking().exchange(
            HttpRequest.POST("/api/v1/namespaces/" + NAMESPACE + "/files?path=/files.zip", body)
                .contentType(MediaType.MULTIPART_FORM_DATA_TYPE)
        );

        assertNamespaceFileContent(URI.create("/file.txt"), "file");
        assertNamespaceFileContent(URI.create("/another_file.txt"), "another_file");
        assertThat(storageInterface.exists(null, toNamespacedStorageUri(NAMESPACE, URI.create("/folder"))), is(true));
        assertNamespaceFileContent(URI.create("/folder/file.txt"), "folder_file");
        // Highlights the fact that we currently don't export / import empty folders (would require adding a method to storages to also retrieve folders)
        assertThat(storageInterface.exists(null, toNamespacedStorageUri(NAMESPACE, URI.create("/empty_folder"))), is(false));

        Flow retrievedFlow = flowRepository.findById(null, NAMESPACE, "task-flow").get();
        assertThat(retrievedFlow.getNamespace(), is(NAMESPACE));
        assertThat(((Subflow) retrievedFlow.getTasks().getFirst()).getNamespace(), is(namespaceToExport));
    }