Modify

Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#2380 closed Feature Request (Completed)

Add _IsDir

Reported by: AZJIO Owned by: guinness
Milestone: 3.3.9.16 Component: Standard UDFs
Version: Severity: None
Keywords: Cc:

Description

Often used.

If _IsDir('C:\WINDOWS') Then MsgBox(0, '', 'this folder') ; A method for checking folders
If Not (_IsDir('C:\Boot.ini') Or @error) Then MsgBox(0, '', 'this file') ; A method for checking the file

Func _IsDir($sTmp)
	$sTmp = FileGetAttrib($sTmp)
	Return SetError(@error, 0, StringInStr($sTmp, 'D', 2) > 0)
EndFunc   ;==>_IsDir

Attachments (0)

Change History (4)

comment:1 by TicketCleanup, 13 years ago

Version: 3.3.9.15

Automatic ticket cleanup.

comment:2 by guinness, 13 years ago

I think it would be best suited as a second/third example for FileGetAttrib. But I will ask my peers what they think as well.

comment:3 by guinness, 13 years ago

Milestone: 3.3.9.16
Owner: set to guinness
Resolution: Completed
Status: newclosed

Added by revision [8433] in version: 3.3.9.16

comment:4 by guinness, 13 years ago

After a lengthy discussion, I went with adding it as an example only.

Modify Ticket

Action
as closed The owner will remain guinness.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.