Changeset 9285


Ignore:
Timestamp:
Apr 25, 2008, 10:41:32 PM (11 years ago)
Author:
mikel
Message:

added some error checks to the plist reader

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/cocoa-ide/builder-utilities.lisp

    r9284 r9285  
    8484    (format out "~A~A" package-type bundle-signature)))
    8585
     86;;; READ-INFO-PLIST info-path
     87;;; returns a newly-created NSDictionary with the contents
     88;;; of the plist file at INFO-PATH
     89(defun read-info-plist (info-path)
     90  (let* ((info-path (pathname info-path)) ; make sure it's a pathname to start
     91         (verified-path (probe-file info-path)))
     92    (assert (and verified-path
     93                 (string-equal (pathname-type verified-path) "plist"))
     94            (info-path)
     95            "The input path for READ-INFO-PLIST must be the name of a valid 'plist' file.")
     96    (let* ((info-path-str (namestring info-path)))
     97      (#/dictionaryWithContentsOfFile: ns:ns-mutable-dictionary
     98                                       info-path-str))))
     99
    86100;;; WRITE-INFO-PLIST path name package-type bundle-signature
    87101;;; Reads the Info.plist file of the running IDE application
     
    131145      (#/writeToFile:atomically: info-dict app-plist-path-str #$YES))))
    132146
    133 (defun read-info-plist (info-path)
    134   (let* ((info-path-str (namestring info-path)))
    135     (#/dictionaryWithContentsOfFile: ns:ns-mutable-dictionary
    136                                      info-path-str)))
     147
    137148
    138149;;; MAKE-APPLICATION-BUNDLE name package-type bundle-signature project-path
Note: See TracChangeset for help on using the changeset viewer.