Changeset 34128 in project


Ignore:
Timestamp:
05/30/17 08:34:16 (4 weeks ago)
Author:
kon
Message:

rel 1.0.5

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wiki/eggref/4/directory-utils

    r20916 r34128  
    1010=== pathname?
    1111
    12 <procedure>(pathname? OBJ)</procedure>
     12<procedure>(pathname? OBJ) => boolean</procedure>
    1313
    1414Does not verify existence of the file, just whether it has dir+fil.
     
    1919=== filename?
    2020
    21 <procedure>(filename? OBJ)</procedure>
     21<procedure>(filename? OBJ) => boolean</procedure>
    2222
    2323Does not verify existence of the file, just whether it doesn't have dir.
     
    7373<procedure>(create-pathname-directory PATHNAME)</procedure>
    7474
    75 Ensures the directory component of PATHNAME exist.
     75Ensures the directory component of {{PATHNAME}} exist.
    7676
    7777Like the '''*nix''' `"mkdir -p `dirname PATHNAME`" command.
     
    7979=== make-program-filename
    8080
    81 <procedure>(make-program-filename COMMAND)</procedure>
     81<procedure>(make-program-filename COMMAND) => *</procedure>
    8282
    8383Returns the platform specific form of an executable command filename.
     
    8888=== make-shell-filename
    8989
    90 <procedure>(make-shell-filename COMMAND)</procedure>
     90<procedure>(make-shell-filename COMMAND) => *</procedure>
    9191
    9292Returns the platform specific form of a shell command filename.
     
    9797=== file-exists/directory?
    9898
    99 <procedure>(file-exists/directory? FILENAME [DIRECTORY | DIRECTORY-LIST])</procedure>
    100 
    101 Returns the pathname when FILENAME exists in the DIRECTORY, otherwise #f.
    102 
    103 DIRECTORY-LIST is as for make-pathname.
    104 
    105 When only the FILENAME parameter supplied then the same as file-exists?.
     99<procedure>(file-exists/directory? FILENAME [DIRECTORY | DIRECTORY-LIST]) => (or #f pathname)</procedure>
     100
     101Returns the pathname when {{FILENAME}} exists in the {{DIRECTORY}}, otherwise #f.
     102
     103{{DIRECTORY-LIST}} is as for make-pathname.
     104
     105When only the {{FILENAME}} argument supplied then the same as file-exists?.
    106106
    107107=== find-file-pathnames
    108108
    109 <procedure>(find-file-pathnames FILENAME [DIRECTORY | DIRECTORY-LIST] ...)</procedure>
    110 
    111 Returns a list of all pathnames found for FILENAME in the supplied
     109<procedure>(find-file-pathnames FILENAME [DIRECTORY | DIRECTORY-LIST] ...) => (or #f (list-of pathname))</procedure>
     110
     111Returns a list of all pathnames found for {{FILENAME}} in the supplied
    112112directory/directories, or #f when not found.
    113113
     
    116116=== find-program-pathnames
    117117
    118 <procedure>(find-program-pathnames COMMAND-NAME [DIRECTORY | DIRECTORY-LIST] ...)</procedure>
    119 
    120 Returns a list of all pathnames found for COMMAND-NAME in the supplied
     118<procedure>(find-program-pathnames COMMAND-NAME [DIRECTORY | DIRECTORY-LIST] ...) => (or #f (list-of pathname))</procedure>
     119
     120Returns a list of all pathnames found for {{COMMAND-NAME}} in the supplied
    121121directory/directories, or #f when not found.
    122122
     
    129129=== which-command-pathnames
    130130
    131 <procedure>(which-command-pathnames COMMAND-NAME [ENVIRONMENT-VARIABLE])</procedure>
    132 
    133 Returns the pathnames of COMMAND-NAME in the ENVIRONMENT-VARIABLE where the
    134 file exists, or #f when nothing found.
    135 
    136 The default ENVIRONMENT-VARIABLE is "PATH".
     131<procedure>(which-command-pathnames COMMAND-NAME [ENVIRONMENT-VARIABLE]) => (or #f (list-of pathname))</procedure>
     132
     133Returns the pathnames of {{COMMAND-NAME}} in the {{ENVIRONMENT-VARIABLE}}
     134where the file exists, or #f when nothing found.
     135
     136The default {{ENVIRONMENT-VARIABLE}} is "PATH".
    137137
    138138Uses the platform specific "PATH" environment variable element separator - a
     
    141141=== which-command-pathname
    142142
    143 <procedure>(which-command-pathname COMMAND-NAME [ENVIRONMENT-VARIABLE])</procedure>
     143<procedure>(which-command-pathname COMMAND-NAME [ENVIRONMENT-VARIABLE]) => (or #f pathname)</procedure>
    144144
    145145Same as which-command-pathnames but returns the first pathname only.
     
    159159<procedure>(push-directory DIRECTORY)</procedure>
    160160
    161 Push the current directory and change to the DIRECTORY.
     161Push the current directory and change to the {{string}} {{DIRECTORY}}.
    162162
    163163===== pop-directory
    164164
    165 <procedure>(pop-directory)</procedure>
     165<procedure>(pop-directory) => string</procedure>
    166166
    167167Pop the last directory and change to it.
     
    169169===== pop-toplevel-directory
    170170
    171 <procedure>(pop-toplevel-directory)</procedure>
     171<procedure>(pop-toplevel-directory) => string</procedure>
    172172
    173173Pop the earliest directory and change to it.
     
    188188== Version history
    189189
     190; 1.0.3 : more tests.
    190191; 1.0.2 : Deprecated {{create-directory/parents}}.
    191192; 1.0.1 :
     
    195196== License
    196197
    197 Copyright (C) 2010 Kon Lovett.  All rights reserved.
     198Copyright (C) 2010-3017 Kon Lovett.  All rights reserved.
    198199
    199200Permission is hereby granted, free of charge, to any person obtaining a
Note: See TracChangeset for help on using the changeset viewer.