Modify

Opened 12 years ago

Closed 12 years ago

Last modified 12 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

Change History (4)

comment:1 Changed 12 years ago by TicketCleanup

  • Version 3.3.9.15 deleted

Automatic ticket cleanup.

comment:2 Changed 12 years ago by guinness

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 Changed 12 years ago by guinness

  • Milestone set to 3.3.9.16
  • Owner set to guinness
  • Resolution set to Completed
  • Status changed from new to closed

Added by revision [8433] in version: 3.3.9.16

comment:4 Changed 12 years ago by guinness

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

Guidelines for posting comments:

  • You cannot re-open a ticket but you may still leave a comment if you have additional information to add.
  • In-depth discussions should take place on the forum.

For more information see the full version of the ticket guidelines here.

Add Comment

Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.