J'essaie de voir si un fichier Info.plist existe ou pas sous la directory courante.
Que le fichier soit présent ou pas, le "result" m'affiche faux et il me dit que le fichier n'existe pas.
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 tell application "Finder" set currentpath to (container of (path to me)) as string display dialog "currentpath:" & currentpath tell application "System Events" set fileExists to exists disk item (my POSIX file (currentpath & "Info.plist") as string) display dialog "result=" & result end tell if not fileExists then display dialog "Info.plist n'existe pas" else display dialog "Info.plist existe " end if end tell
Comprends pas! Une idée ?
Partager