วันพุธที่ 8 เมษายน พ.ศ. 2558

[c#] Accessing a network file share


static void Main(string[] args)
        {
            //var system = System.IO.Directory.GetFiles(@"\\LENOVO-PC\joke\teacher\");
            DirectoryInfo dir = new DirectoryInfo(@"\\LENOVO-PC\joke\teacher\");//
            FileInfo fi = new FileInfo(@"\\LENOVO-PC\joke\teacher\image\1857784.jpg");
            bool exists = fi.Exists;
            while (true) { }
        }

ตัวอย่างจาก
http://stackoverflow.com/questions/20138569/reading-files-from-server-is-being-mapped-always-c-drive

http://stackoverflow.com/questions/18240909/accessing-a-network-file-share-with-c-sharp

ไม่มีความคิดเห็น:

แสดงความคิดเห็น