CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Oct 2010
    Posts
    44

    Unhappy CSharp MoNo - Acessing Linux Folders

    Hello CSharp Masters:


    I am a WINDOWS guy, most of my program works in windows.. Now I have some challenge wherein I need to develop an application that could run in different environment in this case LINUX.

    I have read some tutorials regarding the MoNo for C# and I have manage to run some C# application, but my problem is I need to access a certain folder inside the Linux but I dont know
    how to do it?

    I tried to access this folder:
    /mnt/folderA
    /mnt/folderB

    Can Anyone help me with this one?

    BR,

  2. #2
    Arjay's Avatar
    Arjay is offline Moderator / EX MS MVP Power Poster
    Join Date
    Aug 2004
    Posts
    13,490

    Re: CSharp MoNo - Acessing Linux Folders

    What code are you using to access the folders?

  3. #3
    Join Date
    Oct 2010
    Posts
    44

    Re: CSharp MoNo - Acessing Linux Folders

    Hello Arjay:

    THis is the actual code that I am using.,


    [PermissionSet(SecurityAction.Demand, Name = "FullTrust")]
    public static void MESStartMonitorDS()
    {
    m_WatcherDS = new System.IO.FileSystemWatcher();

    m_WatcherDS.Filter = "*.*";
    m_WatcherDS.Path = sDsPath + "\\";

    m_WatcherDS.NotifyFilter = NotifyFilters.LastAccess | NotifyFilters.LastWrite | NotifyFilters.FileName
    | NotifyFilters.DirectoryName;
    m_WatcherDS.Changed += new FileSystemEventHandler(OnChanged);
    m_WatcherDS.Created += new FileSystemEventHandler(OnChanged);
    m_WatcherDS.EnableRaisingEvents = true;

    }
    Last edited by kpax1684; May 14th, 2012 at 12:33 AM.

  4. #4
    Arjay's Avatar
    Arjay is offline Moderator / EX MS MVP Power Poster
    Join Date
    Aug 2004
    Posts
    13,490

    Re: CSharp MoNo - Acessing Linux Folders

    Are you getting any events at all?

    What does m_WatcherDS.Path resolve to in a debugger? I noticed you have "\\" appended to the end of it. Is that a problem?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured