Microsoft.Scripting.PlatformAdaptationLayer.DirectoryExists C# (CSharp) Method

DirectoryExists() public method

public DirectoryExists ( string path ) : bool
path string
return bool
        public virtual bool DirectoryExists(string path) {
#if !SILVERLIGHT
            return Directory.Exists(path);
#else
            throw new NotImplementedException();
#endif
        }

Usage Example

コード例 #1
0
ファイル: _fileio.cs プロジェクト: joshholmes/ironruby
 private static Stream OpenFile(PlatformAdaptationLayer pal, string name, FileMode fileMode, FileAccess fileAccess, FileShare fileShare) {
     if (pal.DirectoryExists(name)) {
         // TODO: properly set errno
         throw PythonOps.IOError("[Errno 13] Permission denied");
     }
     return pal.OpenInputFileStream(name, fileMode, fileAccess, fileShare);
 }