Chapter 11 - Teach Yourself Scheme in Fixnum Days[Go to...

Info icon This preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Teach Yourself Scheme in Fixnum Days [Go to first , previous , next page; contents ; index ] Chapter 11 System interface Useful Scheme programs often need to interact with the underlying operating system. 11.1 Checking for and deleting files file-exists? checks if its argument string names a file. delete-file deletes its argument file. These procedures are not part of the Scheme standard, but are available in most implementations. These procedures work reliably only for files that are not directories. (Their behavior on directories is dialect- specific.) file-or-directory-modify-seconds returns the time when its argument file or directory was last modified. Time is reckoned in seconds from 12 AM GMT, 1 January 1970. Eg, (file-or-directory-modify-seconds "hello.scm") => 893189629 assuming that the file hello.scm was last messed with sometime on 21 April 1998. 11.2 Calling operating-system commands The system procedure executes its argument string as an operating-system command. 4 It returns true if the command executed successfully with an exit status 0, and false if it failed to execute or exited with a
Image of page 1

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern