I'm trying to use DNN's file system to provide users with documents. I've had luck in the past using this system but now I've started encountering errors that are making me think this system is broke. For instance I have created a folder using the file system then I load a document into the folder. This all works fine. However when I try to retrieve the files from the folder I always get 0 files found. I tried manually deleting the folder to re-create it but the FolderManager states that the folder already exists which then causes and error when I attempt to save a file to a location that doesn't exist. Examples:
var rootExists = FolderManager.Instance.FolderExists(PortalSettings.PortalId, rootFolderPath);
if (!rootExists) // states true even though folder doesn't exist
FolderManager.Instance.AddFolder(PortalSettings.PortalId, rootFolderPath);
var folder = FolderManager.Instance.GetFolder(PortalSettings.PortalId, "PATH/" + UserInfo.UserID);
// create file
var filelist = FolderManager.Instance.GetFiles(folder); // always returns 0 even though I can browse to the directory and open the file.
I have gone as far as to check the dbo.Folders table and removed any entrees to the folder I have deleted. Still states the folder exists.
I think it's a very basic requirement that when I have a method like 'FolderExists' it should at minimum actually check that the folder is there. Has anyone encountered issues using the file system? Thanks.