public ZlpFileOrDirectoryInfo(
     ZlpFileOrDirectoryInfo info)
 {
     _preferedType = info._preferedType;
     _fullPath = info.FullName;
     _originalPath = info._originalPath;
 }
 public ZlpFileOrDirectoryInfo(
     ZlpFileOrDirectoryInfo info)
 {
     _preferedType = info._preferedType;
     _fullPath     = info.FullName;
     _originalPath = info._originalPath;
 }
 public static int Compare(
     ZlpFileOrDirectoryInfo one,
     ZlpDirectoryInfo two)
 {
     return(string.Compare(one.FullName.TrimEnd('\\'), two.FullName.TrimEnd('\\'),
                           StringComparison.OrdinalIgnoreCase));
 }
 public ZlpFileOrDirectoryInfo Combine(
     ZlpFileOrDirectoryInfo info)
 {
     return
         (new ZlpFileOrDirectoryInfo(
              ZlpPathHelper.Combine(
                  EffectiveDirectory.FullName,
                  info.FullName)));
 }
 public static bool SafeExists(this ZlpFileOrDirectoryInfo i)
 {
     if (i == null || i.IsEmpty)
     {
         return(false);
     }
     else if (i.IsDirectory)
     {
         return(ZlpSafeFileOperations.SafeDirectoryExists(i.Directory));
     }
     else if (i.IsFile)
     {
         return(ZlpSafeFileOperations.SafeFileExists(i.File));
     }
     else
     {
         return(false);
     }
 }
Beispiel #6
0
 public static ZlpSplittedPath SplitPath(
     ZlpFileOrDirectoryInfo path)
 {
     return(path.ZlpSplittedPath);
 }
 public static ZlpFileOrDirectoryInfo Combine(
     ZlpFileOrDirectoryInfo one,
     string two)
 {
     return(new ZlpFileOrDirectoryInfo(one).Combine(two));
 }
 public int Compare(
     ZlpFileOrDirectoryInfo b)
 {
     return(Compare(b.FullName));
 }
 public static int Compare(
     ZlpFileOrDirectoryInfo one,
     string two)
 {
     return(new ZlpFileOrDirectoryInfo(one).Compare(two));
 }
Beispiel #10
0
 public static ZlpSplittedPath SplitPath(
     ZlpFileOrDirectoryInfo path)
 {
     return path.ZlpSplittedPath;
 }
 public ZlpFileOrDirectoryInfo Combine(
     ZlpFileOrDirectoryInfo info)
 {
     return
         new ZlpFileOrDirectoryInfo(
             ZlpPathHelper.Combine(
                 EffectiveDirectory.FullName,
                 info.FullName));
 }
 public static ZlpFileOrDirectoryInfo Combine(
     ZlpFileOrDirectoryInfo one,
     string two)
 {
     return new ZlpFileOrDirectoryInfo(one).Combine(two);
 }
 public int Compare(
     ZlpFileOrDirectoryInfo b)
 {
     return Compare(b.FullName);
 }
 public static int Compare(
     ZlpFileOrDirectoryInfo one,
     string two)
 {
     return new ZlpFileOrDirectoryInfo(one).Compare(two);
 }
 public static int Compare(
     ZlpFileOrDirectoryInfo one,
     ZlpDirectoryInfo two)
 {
     return string.Compare(one.FullName.TrimEnd('\\'), two.FullName.TrimEnd('\\'), StringComparison.OrdinalIgnoreCase);
 }
Beispiel #16
0
 public ZlpSplittedPath(
     string path)
 {
     Info = new ZlpFileOrDirectoryInfo(path);
 }