public IFileObject ResolveFile(string name) { if (name.Length > 0) { name = FormatPath(name); } Query query = new Query(TableName, new QueryConditionNode((QField)KeyFieldName, Conditions.Equal, (QConst)name)); IDictionary fileData = Dalc.LoadRecord(query); if (fileData != null) { return((IFileObject)FileSystemHelper.SetFileProperties(new DalcFileObject(this), fileData)); } else { IFileObject fileObj = new DalcFileObject(name, FileType.Imaginary, this); if (name.Length == 0) { fileObj.CreateFolder(); } return(fileObj); } }
/// <summary> /// Method fills DalcFileContent instance by data from storage they exists /// </summary> /// <param name="fileContent">DalcFileContent instance</param> /// <param name="name">Filename</param> /// <returns></returns> public DalcFileContent GetContent(DalcFileContent fileContent, string name) { if (name.Length > 0) { name = FormatPath(name); } Query q = new Query(ContentTableName, new QueryConditionNode((QField)KeyFieldName, Conditions.Equal, (QConst)name)); IDictionary contentData = Dalc.LoadRecord(q); if (contentData != null) { fileContent = FileSystemHelper.SetContentProperties(fileContent, contentData); } return(fileContent); }
public IDictionary LoadRecord(IDictionary <string, object> context) { return(Dalc.LoadRecord(PrepareQuery(context))); }