cadencii.java.io.File.canRead C# (CSharp) 메소드

canRead() 공개 메소드

この抽象パス名が示すファイルをアプリケーションが読み込めるかどうかを判定します。
public canRead ( ) : bool
리턴 bool
        public bool canRead()
        {
            System.IO.FileStream fs = null;
            bool ret = false;
            try {
                fs = System.IO.File.OpenRead( m_path );
                ret = true;
            } catch {
                ret = false;
            } finally {
                if ( fs != null ) {
                    try {
                        fs.Close();
                    } catch {
                    }
                }
            }
            return ret;
        }