Fan.Sys.Uri.isDir C# (CSharp) Method

isDir() public method

public isDir ( ) : bool
return bool
        public bool isDir()
        {
            if (m_pathStr != null)
              {
            string p = m_pathStr;
            int len = p.Length;
            if (len > 0 && p[len-1] == '/')
              return true;
              }
              return false;
        }

Usage Example

コード例 #1
0
ファイル: LocalFile.cs プロジェクト: nomit007/f4
 public LocalFile(Uri uri, FileSystemInfo file)
     : base(uri)
 {
     this.m_file = file;
       if (System.IO.Directory.Exists(file.FullName))
       {
     if (!uri.isDir())
       throw IOErr.make("Must use trailing slash for dir: " + uri).val;
       }
       else if (System.IO.File.Exists(file.FullName))
       {
     if (uri.isDir())
       throw IOErr.make("Cannot use trailing slash for file: " + uri).val;
       }
 }
All Usage Examples Of Fan.Sys.Uri::isDir