Sharpen.FilePath.GetParent C# (CSharp) 메소드

GetParent() 공개 메소드

public GetParent ( ) : string
리턴 string
		public string GetParent ()
		{
			string p = Path.GetDirectoryName (path);
			if (string.IsNullOrEmpty(p) || p == path)
				return null;
			else
				return p;
		}

Usage Example

예제 #1
0
파일: Program.cs 프로젝트: hazzik/Rhino.Net
		private FilePath GetOutputFile(FilePath parentDir, string className)
		{
			string path = className.Replace('.', FilePath.separatorChar);
			path = System.String.Concat(path, ".class");
			FilePath f = new FilePath(parentDir, path);
			string dirPath = f.GetParent();
			if (dirPath != null)
			{
				FilePath dir = new FilePath(dirPath);
				if (!dir.Exists())
				{
					dir.Mkdirs();
				}
			}
			return f;
		}
All Usage Examples Of Sharpen.FilePath::GetParent