System.IO.FileInfo.Init C# (CSharp) Method

Init() private method

private Init ( String fileName ) : void
fileName String
return void
        private void Init(String fileName)
        {
            OriginalPath = fileName;
            // Must fully qualify the path for the security check
            String fullPath = Path.GetFullPath(fileName);

            _name = Path.GetFileName(fileName);
            FullPath = fullPath;
            DisplayPath = GetDisplayPath(fileName);
        }

Usage Example

Example #1
0
        internal static unsafe FileInfo Create(string fullPath, ref FileSystemEntry findData)
        {
            FileInfo info = new FileInfo(fullPath, fileName: findData.FileName.GetStringFromFixedBuffer(), isNormalized: true);

            info.Init(findData._info);
            return(info);
        }
All Usage Examples Of System.IO.FileInfo::Init