private SharpFileSystem.FileSystemPath GetRelativePath(SharpFileSystem.FileSystemPath path)
 {
     string s = path.ToString();
     int sindex = s.LastIndexOf(ArchiveDirectorySeparator.ToString() + SharpFileSystem.FileSystemPath.DirectorySeparator);
     if (sindex < 0)
         return path;
     return SharpFileSystem.FileSystemPath.Parse(s.Substring(sindex + 1));
 }
 protected bool TryGetArchivePath(SharpFileSystem.FileSystemPath path, out SharpFileSystem.FileSystemPath archivePath)
 {
     string p = path.ToString();
     int sindex = p.LastIndexOf(ArchiveDirectorySeparator.ToString() + SharpFileSystem.FileSystemPath.DirectorySeparator);
     if (sindex < 0)
     {
         archivePath = path;
         return false;
     }
     archivePath = SharpFileSystem.FileSystemPath.Parse(p.Substring(0, sindex));
     return true;
 }
 protected bool HasArchive(SharpFileSystem.FileSystemPath path)
 {
     return path.ToString().LastIndexOf(ArchiveDirectorySeparator.ToString() + SharpFileSystem.FileSystemPath.DirectorySeparator) >= 0;
 }
Beispiel #4
0
 public string GetPhysicalPath(SharpFileSystem.FileSystemPath path)
 {
     return Path.Combine(PhysicalRoot, path.ToString().Remove(0, 1).Replace(SharpFileSystem.FileSystemPath.DirectorySeparator, Path.DirectorySeparatorChar));
 }