Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我试图在创建文件之前获取文件的短路径。如果文件夹或文件存在,我找到了一个可以将路径转换为短路径的示例。但是,有没有办法在文件存在之前获得短路径?
感谢所有的评论。我认为解决这个问题的最简单方法是:
if file DOES NOT existed: generate shortPath return shortPath else: touch a new file with exact name expected. generate shortPath remove temp file return shortPath