public UnixFileSystemInfo GetContents() { ReadLink(); return(UnixFileSystemInfo.GetFileSystemEntry( UnixPath.Combine(UnixPath.GetDirectoryName(FullPath), ContentsPath))); }
private UnixFileSystemInfo[] GetFileSystemEntries(Dirent[] dentries) { UnixFileSystemInfo[] fileSystemEntry = new UnixFileSystemInfo[(int)dentries.Length]; for (int i = 0; i != (int)fileSystemEntry.Length; i++) { fileSystemEntry[i] = UnixFileSystemInfo.GetFileSystemEntry(UnixPath.Combine(base.FullPath, new string[] { dentries[i].d_name })); } return(fileSystemEntry); }
private UnixFileSystemInfo[] GetFileSystemEntries(Native.Dirent[] dentries) { UnixFileSystemInfo[] entries = new UnixFileSystemInfo[dentries.Length]; for (int i = 0; i != entries.Length; ++i) { entries [i] = UnixFileSystemInfo.GetFileSystemEntry( UnixPath.Combine(FullPath, dentries[i].d_name)); } return(entries); }
public static string Combine(string path1, params string[] paths) { if (path1 == null) { throw new ArgumentNullException("path1"); } if (paths == null) { throw new ArgumentNullException("paths"); } if (path1.IndexOfAny(UnixPath._InvalidPathChars) != -1) { throw new ArgumentException("Illegal characters in path", "path1"); } int length = path1.Length; int num = -1; for (int i = 0; i < (int)paths.Length; i++) { if (paths[i] == null) { throw new ArgumentNullException(string.Concat("paths[", i, "]")); } if (paths[i].IndexOfAny(UnixPath._InvalidPathChars) != -1) { throw new ArgumentException("Illegal characters in path", string.Concat("paths[", i, "]")); } if (UnixPath.IsPathRooted(paths[i])) { length = 0; num = i; } length = length + paths[i].Length + 1; } StringBuilder stringBuilder = new StringBuilder(length); if (num == -1) { stringBuilder.Append(path1); num = 0; } for (int j = num; j < (int)paths.Length; j++) { UnixPath.Combine(stringBuilder, paths[j]); } return(stringBuilder.ToString()); }
public UnixFileSystemInfo GetContents() { this.ReadLink(); return(UnixFileSystemInfo.GetFileSystemEntry(UnixPath.Combine(UnixPath.GetDirectoryName(base.FullPath), new string[] { this.ContentsPath }))); }