private Guid? GetFileId(string path)
{
string[] components = path.Split(Separators, StringSplitOptions.RemoveEmptyEntries);
if(components.Length == 0) {
return null;
}
string fileName = components[components.Length - 1];
StoreFolder folder = GetFolder(path.Substring(0, path.Length - fileName.Length));
if(folder == null) {
return null;
}
// check if the folder contains the file
if(folder.Files.ContainsKey(fileName)) {
return folder.Files[fileName];
}
return null;
}