Skip to content

[PB-6280]: create folders from DocumentsProvider createDocument#476

Open
terrerox wants to merge 3 commits into
release-1.9.1from
feature/PB-6280-create-folder
Open

[PB-6280]: create folders from DocumentsProvider createDocument#476
terrerox wants to merge 3 commits into
release-1.9.1from
feature/PB-6280-create-folder

Conversation

@terrerox

@terrerox terrerox commented Jun 3, 2026

Copy link
Copy Markdown

Implement the folder branch of InternxtDocumentsProvider.createDocument so users can create folders from the Android system file picker (SAF "New folder"). When the requested mimeType is MIME_TYPE_DIR, the provider resolves a non-colliding name, POSTs via InternxtApiClient.createFolder, invalidates the parent's cached children, and returns the encoded folder document id. The existing pending-upload path is preserved for files.

Extract the pure naming logic (uniqueName, splitNameExt, joinNameType) into a standalone DocumentNaming object and collapse the duplicated file/folder name resolvers into a single generic uniqueChildName helper, so the only difference between them is the list endpoint and name extractor.

Add DocumentNaming unit tests covering collision suffixing, extension preservation, the bare-folder case, and the split/join edge cases.

@terrerox terrerox requested a review from CandelR June 3, 2026 03:59
@terrerox terrerox self-assigned this Jun 3, 2026
@terrerox terrerox force-pushed the feature/PB-6281-upload-tests branch from bfd599c to b869027 Compare June 6, 2026 17:35
terrerox added 3 commits June 6, 2026 13:35
Implement the folder branch of InternxtDocumentsProvider.createDocument so users can create folders from the Android system file picker (SAF "New folder"). When the requested mimeType is MIME_TYPE_DIR, the provider resolves a non-colliding name, POSTs via InternxtApiClient.createFolder, invalidates the parent's cached children, and returns the encoded folder document id. The existing pending-upload path is preserved for files.

Extract the pure naming logic (uniqueName, splitNameExt, joinNameType) into a standalone DocumentNaming object and collapse the duplicated file/folder name resolvers into a single generic uniqueChildName helper, so the only difference between them is the list endpoint and name extractor.

Add DocumentNaming unit tests covering collision suffixing, extension preservation, the bare-folder case, and the split/join edge cases.
@terrerox terrerox force-pushed the feature/PB-6280-create-folder branch from 5b6a97b to b6a285e Compare June 6, 2026 17:36
@sonarqubecloud

sonarqubecloud Bot commented Jun 6, 2026

Copy link
Copy Markdown

@terrerox terrerox requested a review from xabg2 June 9, 2026 13:10
Base automatically changed from feature/PB-6281-upload-tests to release-1.9.1 June 10, 2026 20:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants