Hiyve Components - v1.0.0
    Preparing search index...

    Interface UseFileOperationsResult

    Result of the useFileOperations hook.

    interface UseFileOperationsResult {
        attendees: { userId: string; userName?: string }[];
        fetchFileTypes: () => Promise<void>;
        handleCreateFolder: (name: string) => Promise<void>;
        handleDelete: (filesToDelete: FileEntry[]) => Promise<void>;
        handleDeleteFolder: (folder: FolderEntry) => Promise<void>;
        handleDownload: (filesToDownload: FileEntry[]) => Promise<void>;
        handleFileTypeChange: (fileType: string) => void;
        handleRename: (file: FileEntry, newName: string) => Promise<void>;
        handleShare: (files: FileEntry[], userIds: string[]) => Promise<void>;
        handleUpload: (event: ChangeEvent<HTMLInputElement>) => Promise<void>;
        handleUploadFiles: (files: FileList | File[]) => Promise<void>;
        isCreatingFolder: boolean;
        isDeleting: boolean;
        isRenaming: boolean;
        isSharing: boolean;
        prepareShareDialog: () => Promise<{ userId: string; userName?: string }[]>;
        selectedFileType: string | null;
        usersFileTypes: string[];
    }
    Index

    Properties

    attendees: { userId: string; userName?: string }[]

    Available attendees for sharing

    fetchFileTypes: () => Promise<void>

    Fetch available file types

    handleCreateFolder: (name: string) => Promise<void>

    Handle folder creation

    handleDelete: (filesToDelete: FileEntry[]) => Promise<void>

    Handle file deletion

    handleDeleteFolder: (folder: FolderEntry) => Promise<void>

    Handle folder deletion

    handleDownload: (filesToDownload: FileEntry[]) => Promise<void>

    Handle file download

    handleFileTypeChange: (fileType: string) => void

    Handle file type filter change

    handleRename: (file: FileEntry, newName: string) => Promise<void>

    Handle file rename

    handleShare: (files: FileEntry[], userIds: string[]) => Promise<void>

    Handle file sharing

    handleUpload: (event: ChangeEvent<HTMLInputElement>) => Promise<void>

    Handle file upload from input change event. Supports multiple inputs — uploads each selected file sequentially and refreshes once at the end.

    handleUploadFiles: (files: FileList | File[]) => Promise<void>

    Upload an arbitrary list of File objects (e.g. from a drag-and-drop drop event) into the current path. Sequential upload; one refresh at the end. Failures on individual files are logged but don't abort the batch.

    isCreatingFolder: boolean

    Whether a create folder operation is in progress

    isDeleting: boolean

    Whether a delete operation is in progress

    isRenaming: boolean

    Whether a rename operation is in progress

    isSharing: boolean

    Whether a share operation is in progress

    prepareShareDialog: () => Promise<{ userId: string; userName?: string }[]>

    Prepare attendees list for the sharing dialog.

    Returns the resolved attendees (post-filter, excluding the current user) in addition to setting the internal state. Callers that want to branch their UX on the attendee count — e.g. skip the dialog and act directly when there's exactly one — can inspect the resolved list without waiting for a re-render.

    selectedFileType: string | null

    Currently selected file type filter

    usersFileTypes: string[]

    Available file types for filtering