예제 #1
0
파일: File.cs 프로젝트: bangush/LongPath
        private static StreamReader OpenText(string path, Encoding encoding)
        {
            if (Common.IsRunningOnMono() && Common.IsPlatformUnix())
            {
                return(SysFile.OpenText(path));
            }

            var stream = Open(path, FileMode.Open, FileAccess.Read, FileShare.Read, DefaultBufferSize, FileOptions.SequentialScan);

            return(new StreamReader(stream, encoding, true, 1024));
        }
예제 #2
0
파일: File.cs 프로젝트: tmct/LongPath
        public static StreamReader OpenText(string path)
        {
            if (Common.IsRunningOnMono())
            {
                return(SysFile.OpenText(path));
            }

            var stream = Open(path, FileMode.Open, FileAccess.Read, FileShare.Read, DefaultBufferSize, FileOptions.SequentialScan);

            return(new StreamReader(stream, Encoding.UTF8, true, 1024));
        }