Is one step folder creation possible in Finder ?

I need to disallow folder renaming on my NSFileProviderReplicatedExtension extension as my foreign API system changes the asset id when a folder gets renamed and I can't retrieve or compute the new ID.

For this reason I disable .allowsRenaming on folders for this volume but the Finder will still trigger the two step create "untitled folder" / rename when creating new folders.

I can see that existing folders can't be renamed on the volume so the capability seems properly managed by my extension.

Is there a way to prevent the creation of the "untitled folder" folder when creating new folders in Finder on a folder with renaming disabled ?

Answered by Engineer in 794630022

That is not possible today. Could you file a Feedback regarding this?

One workaround you could implement on your side (which is admittedly a bit hacky), is: return an error for creation of directories with "untitled folder" name, until they are renamed. And have some timeout after which you stop rejecting the creations, in case the user decides not to rename it.

One tricky area there, the "untitled folder" name is localized, so you would need to hardcode for the various languages that you care about.

That is not possible today. Could you file a Feedback regarding this?

One workaround you could implement on your side (which is admittedly a bit hacky), is: return an error for creation of directories with "untitled folder" name, until they are renamed. And have some timeout after which you stop rejecting the creations, in case the user decides not to rename it.

One tricky area there, the "untitled folder" name is localized, so you would need to hardcode for the various languages that you care about.

Thanks for the reply this is amazing !

I managed to get the API vendor to keep the same ID when renaming a folder so all good now.

Still seems to be a flaw that renaming is allowed on .allowRenaming disabled volumes

Thanks again,

Is one step folder creation possible in Finder ?
 
 
Q