Changeset 9121


Ignore:
Timestamp:
05/10/05 18:11:32 (16 years ago)
Author:
piso
Message:

MAKE-TEMP-FILE

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/j/src/org/armedbear/lisp/Extensions.java

    r8866 r9121  
    33 *
    44 * Copyright (C) 2002-2005 Peter Graves
    5  * $Id: Extensions.java,v 1.37 2005-04-04 18:45:38 piso Exp $
     5 * $Id: Extensions.java,v 1.38 2005-05-10 18:11:32 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    2222package org.armedbear.lisp;
    2323
     24import java.io.File;
     25import java.io.IOException;
    2426import java.net.Socket;
    2527
     
    174176        }
    175177    };
     178
     179    // ### make-temp-file => namestring
     180    private static final Primitive MAKE_TEMP_FILE =
     181        new Primitive("make-temp-file", PACKAGE_EXT, true, "")
     182    {
     183        public LispObject execute() throws ConditionThrowable
     184        {
     185            try {
     186                File file = File.createTempFile("abcl", null, null);
     187                if (file != null)
     188                    return new Pathname(file.getPath());
     189            }
     190            catch (IOException e) {
     191                Debug.trace(e);
     192            }
     193            return NIL;
     194        }
     195    };
    176196}
Note: See TracChangeset for help on using the changeset viewer.