我想弄清楚是否可以訪問以下3個位置的任何一個,並追加到建立位置,如果有多個位置可以選擇其中一個,並且如果沒有退出,任何人都可以提供如何做到這一點的信息?如何檢查位置是可訪問和追加到位置
1.BIN-LOC-WiFi的FW \ loc_proc \ BIN
2.loc_proc \ PKG \ cnss_proc \ BIN
3.loc_proc_ps \包
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace aputloader
{
class Program
{
static void Main(string[] args)
{
string buildlocation = @"\\location\builds784\INTEGRATION\LOC.1.2-00028-Z-1";
//check if atleast one of the following folders exist and append to buildlocation
//1.BIN-LOC-WiFi-FW\loc_proc\bin
//2.loc_proc\pkg\cnss_proc\bin
//3.loc_proc_ps\package
//multiple folders exist ,pick one
//none exist ,bail out
}
}
}
https://msdn.microsoft.com/en-us/library/system.io.directory.exists(v=vs.110).aspx – Danieboy
Danieboy - 我瞭解我必須使用'目錄。存在',我更感興趣的是如何檢查它的每一個,我應該把3個路徑放在一個列表中,然後追加到構建位置並遍歷每個路徑來檢查它是否存在? – kemosabee