Beispiel #1
0
        public string GetRelativeName(DirectoryInfo baseDirectoryInfo)
        {
            var baseDirectory = new AllorsDirectoryInfo(baseDirectoryInfo);
            var directory     = new AllorsDirectoryInfo(this.fileInfo.Directory);

            var relativePath = directory.GetRelativeName(baseDirectory);

            return(relativePath == null ? null : Path.Combine(relativePath, this.fileInfo.Name));
        }
Beispiel #2
0
        public string GetRelativeName(DirectoryInfo baseDirectoryInfo)
        {
            var baseDirectory = new AllorsDirectoryInfo(baseDirectoryInfo);
            var directory = new AllorsDirectoryInfo(fileInfo.Directory);

            string relativePath = directory.GetRelativeName(baseDirectory);
            if (relativePath == null)
            {
                return null;
            }

            return Path.Combine(relativePath, this.fileInfo.Name);
        }
Beispiel #3
0
        public string GetRelativeName(DirectoryInfo baseDirectoryInfo)
        {
            var baseDirectory = new AllorsDirectoryInfo(baseDirectoryInfo);
            var directory     = new AllorsDirectoryInfo(fileInfo.Directory);

            string relativePath = directory.GetRelativeName(baseDirectory);

            if (relativePath == null)
            {
                return(null);
            }

            return(Path.Combine(relativePath, this.fileInfo.Name));
        }