Example #1
0
        public void Rebase(Path source, Path target)
        {
            if (!source._isDirectory || !target._isDirectory)
            {
                throw new ApplicationException("Rebase parameters \"source\" and \"target\" should both be directory paths.");
            }

            Parent = new Path(target + ToString().Substring(source.ToString().Length)).Parent;
        }
Example #2
0
 private IEnumerable<FileSystemItem> FindChildren(Path path, ICriterion criterion)
 {
     return _sessionProvider.OpenSession.Session
         .CreateCriteria<FileSystemItem>()
         .Add(Restrictions.Eq("Path.Parent", path.ToString()))
         .Add(criterion)
         .List<FileSystemItem>();
 }
Example #3
0
 public bool IsDescendantOf(Path source)
 {
     return Parent.StartsWith(source.ToString());
 }