SenseNet.ContentRepository.Storage.RepositoryPath.GetFileNameSafe C# (CSharp) Метод

GetFileNameSafe() публичный статический Метод

Gets the file name from a path, which is located after the last PathSeparator, without checking path validity.
public static GetFileNameSafe ( string path ) : string
path string The path.
Результат string
        public static string GetFileNameSafe(string path)
        {
            if (string.IsNullOrEmpty(path))
                return string.Empty;
            var p = path.LastIndexOf(RepositoryPath.PathSeparator, StringComparison.Ordinal);
            return p <= 0 ? path : path.Substring(p + 1);
        }