我有一个结合路径的函数。例子
我的应用程序位于 D:\toto\titi\tata\myapplication.exe
我创建了一个 windows 窗体应用程序 (c#),它根据我的应用程序的路径 ( D:\toto\titi\tata\myapplication.exe)解决相对路径。
我想要这个:
1)解决的路径是 test.txt => D:\toto\titi\tata\test.txt
2)解决的路径是 .\..\..\test\test.txt => D:\toto\test\test.txt
3)解决的路径是 .\..\test\test.txt => D:\toto\titi\test\test.txt
4)解决的路径是 .\..\..\..\test\test.txt => D:\test\test.txt
5)解决的路径是 .\..\..\..\..\test\test.txt => The path doesn't exist
6)解决的路径是 \\server\share\folder\test => get the corresponding path in the server.
我用这个方法
private void btnSearchFile_Click(object sender, EventArgs e)
{
// Open an existing file, or create a new one.
FileInfo fi = new FileInfo(@"D:\toto\titi\tata\myapplication.exe");
// Determine the full path of the file just created or opening. …Run Code Online (Sandbox Code Playgroud) 我想在 JavaScript 中有一个正则表达式,它可以帮助我验证仅包含小写字符 和 this 字符的字符串-。
我用这个表达:
var regex = /^[a-z][-\s\.]$/
Run Code Online (Sandbox Code Playgroud)
这不起作用。任何想法?
当我在 Angular 11 中的 app.module.ts 中声明拦截器时遇到问题。我有 Visual Studio Code IDE。
我有安装类型
npm install @types/node --save-dev
Run Code Online (Sandbox Code Playgroud)
并修改我的 tsconfig.json。谁能帮我解决这个编译错误?
我有打字稿 4.0.2 版本