Das Ausführen von Visual Studio als Administrator sieht keine zugeordneten Netzwerkantriebe fest
Posted: 28 Feb 2025, 04:08
Ich habe ein Problem mit der Art und Weise, wie Datei.
Aber wenn ich den Dateipfad in eine Explorer -Fenster -URL kopiere/einfüge (das Entfernen der Flucht \ ) öffnet die Datei . des Pfades (der 43 ist) und FileInfo < /code> ist keine bessere Option, wie hier vorgeschlagen.var f = new FileInfo(filePath);
{P:\poolman\LY21\2015\LY21_2015-03-25_03.xml}
base: {P:\poolman\LY21\2015\LY21_2015-03-25_03.xml}
_name: "LY21_2015-03-25_03.xml"
Directory: {P:\poolman\LY21\2015}
DirectoryName: "P:\\poolman\\LY21\\2015"
Exists: false
IsReadOnly: true
Length: '(var f = new FileInfo(filePath);).Length' threw an exception of type 'System.IO.FileNotFoundException'
Name: "LY21_2015-03-25_03.xml"
< /code>
Wie könnte ich damit umgehen? < /p>
Code: Select all
filePath
"P:\\poolman\\LY21\\2015\\LY21_2015-03-25_03.xml"
File.Exists(filePath)
false
{P:\poolman\LY21\2015\LY21_2015-03-25_03.xml}
base: {P:\poolman\LY21\2015\LY21_2015-03-25_03.xml}
_name: "LY21_2015-03-25_03.xml"
Directory: {P:\poolman\LY21\2015}
DirectoryName: "P:\\poolman\\LY21\\2015"
Exists: false
IsReadOnly: true
Length: '(var f = new FileInfo(filePath);).Length' threw an exception of type 'System.IO.FileNotFoundException'
Name: "LY21_2015-03-25_03.xml"
< /code>
Wie könnte ich damit umgehen? < /p>