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.
ファイルが作成される前に、ファイルの短いパスを取得しようとしています。フォルダーまたはファイルが存在する場合、パスを shortPath に変換できる例を見つけました。ただし、ファイルが存在する前に短いパスを取得する方法はありますか?
すべてのコメントをありがとう。この問題を解決する最も簡単な方法は次のとおりだと思います。
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