-
May 13th, 2012, 08:36 PM
#1
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,
-
May 13th, 2012, 10:09 PM
#2
Re: CSharp MoNo - Acessing Linux Folders
What code are you using to access the folders?
-
May 14th, 2012, 12:23 AM
#3
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.
-
May 14th, 2012, 11:48 AM
#4
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|