ReviewR.Web.Api.IterationsController.GetDirectoryName C# (CSharp) Method

GetDirectoryName() private static method

private static GetDirectoryName ( FileChange f ) : string
f ReviewR.Web.Models.Data.FileChange
return string
        private static string GetDirectoryName(FileChange f)
        {
            var fileName = String.IsNullOrEmpty(f.NewFileName) ? f.FileName : f.NewFileName;
            int lastSlash = fileName.LastIndexOf('/');
            if (lastSlash > -1)
            {
                return fileName.Substring(0, lastSlash);
            }
            return null;
        }