1 // Copyright (C) The Arvados Authors. All rights reserved.
3 // SPDX-License-Identifier: AGPL-3.0
5 import { Tree } from './tree';
7 export type CollectionFilesTree = Tree<CollectionDirectory | CollectionFile>;
9 export enum CollectionFileType {
10 DIRECTORY = 'directory',
14 export interface CollectionDirectory {
18 type: CollectionFileType.DIRECTORY;
21 export interface CollectionFile {
26 type: CollectionFileType.FILE;
29 export interface CollectionUploadFile {
33 export const createCollectionDirectory = (data: Partial<CollectionDirectory>): CollectionDirectory => ({
37 type: CollectionFileType.DIRECTORY,
41 export const createCollectionFile = (data: Partial<CollectionFile>): CollectionFile => ({
46 type: CollectionFileType.FILE,