We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Hide the default About.txt file when creating a new folder

I'm using the azure asp.net core file provider and I understand why the default About.txt file is created when creating a new folder.  But I see in your documentation that I can set showHiddenItems to false (which it is by default) so I'd like to know how I can make that About.txt file a "hidden" file so my users won't see it.  Thanks!

1 Reply

KR Keerthana Rajendran Syncfusion Team November 27, 2019 02:04 PM UTC

Hi Brian,  
Thanks for contacting Syncfusion support.  
We have checked your reported query “To remove the About.txt file in azure file provider”. In Azure Blob storage, we were unable to create the empty folder, because empty directory is not accepted in Azure. If we create any folder, we have add the file(About.txt) during create folder operations. Refer the below link for your reference. 
If you want to hide this file, you need to manually remove the file after folder has been created. For this case, we have sent each request on file operations. So you can use Read operations (folder navigation) to remove that file and sent the updated request response to client side. 
Refer the below code snippet to remove the file. It will remove the particular file. 
/*File path -Models/AzureFileProvider.cs*/          
 
protected async Task<FileManagerResponse> GetFilesAsync(string path, string filter, FileManagerDirectoryContent[] selectedItems) 
        { 
... 
... 
   for(var i=0;i<details.Count;i++) 
            { 
                if(details[i].Name == "About.txt") 
                { 
                    details.RemoveAt(i); 
                } 
            } 
            readResponse.Files = details; 
            return readResponse; 
} 
 
Note: It is mandatory that same file name (About.txt) is not created in your side.  
Note: After running the service, refer the local host URL in file manager sample. 
Please let us know, if you have any concerns. 
 
Regards, 
Keerthana. 


Loader.
Live Chat Icon For mobile
Up arrow icon