Re: file functions & FrontEnd`FileName
- To: mathgroup at smc.vnet.net
- Subject: [mg73098] Re: file functions & FrontEnd`FileName
- From: "David Reiss" <dbreiss at gmail.com>
- Date: Sat, 3 Feb 2007 04:00:04 -0500 (EST)
- References: <eps7gh$9c1$1@smc.vnet.net>
In[1]:= file=FrontEnd`FileName[{$RootDirectory,"Users","dreiss","Desktop"}, "DirectoryExtension.nb"] Out[1]= FrontEnd`FileName[{$RootDirectory,Users,dreiss,Desktop},DirectoryExtension.nb] In[2]:= DirectoryName[file] Out[2]= DirectoryName[ FrontEnd`FileName[{$RootDirectory,Users,dreiss,Desktop}, DirectoryExtension.nb]] In[3]:= Unprotect[DirectoryName] Out[3]= {} In[4]:= DirectoryName[z_? (Head[#]===FrontEnd`FileName&)]:=DirectoryName[ToFileName[z]] In[5]:= Protect[DirectoryName] Out[5]= {DirectoryName} In[6]:= DirectoryName[file] Out[6]= /Users/dreiss/Desktop/ --David A WorkLife FrameWork version 1.1 is now available at http://www.scientificarts.com/worklife On Feb 1, 3:14 am, "Chris Chiasson" <c... at chiasson.name> wrote: > It would be nice (heh) if DirectoryName and FileType could work > directly on FrontEnd`FileName objects. In the case of DirectoryName, > it might be wise to generate a new type of FrontEnd` symbol to hold > the result string. I don't know if there are other functions that > could benefit from this treatment. > > Thanks for listening, > > --http://chris.chiasson.name/
- Follow-Ups:
- Re: Re: file functions & FrontEnd`FileName
- From: "Chris Chiasson" <chris@chiasson.name>
- Re: Re: file functions & FrontEnd`FileName