myDir = "TS_Storage"
myResource = "Images"
Try
If Not(File.IsDirectory(File.DirDocuments ,myDir)) Then
File.MakeDir(File.DirDocuments, myDir) ' this line has error
End If
Catch
File.MakeDir(File.DirDocuments, myDir) ' with this line dir is created
End Try
Msgbox(File.IsDirectory(File.DirDocuments,myDir),"Verifica esistenza Dir...")
Try
If Not(File.IsDirectory(File.DirDocuments ,File.Combine(myDir, myResource))) Then
File.MakeDir(File.DirDocuments, File.Combine(myDir, myResource))
End If
Catch
File.MakeDir(File.DirDocuments, File.Combine(myDir, myResource))
End Try
Msgbox(File.IsDirectory(File.DirDocuments,File.Combine(myDir, myResource)),"Verifica esistenza Dir...")
Error
Application_Start
Error occurred on line: 55 (ts_App)
Error getting attributes: Error Domain=NSCocoaErrorDomain Code=260 "The file “TS_Storage” couldn’t be opened because there is no such file." UserInfo={NSFilePath=/Users/techservice/Library/Developer/CoreSimulator/Devices/EBEA0EDA-452D-4408-9367-09DED1B2561F/data/Containers/Data/Application/0ACEF91C-266B-4593-B610-C46B487EEBFF/Documents/TS_Storage, NSUnderlyingError=0x6000018a9e60 {Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"}}
Stack Trace: (
CoreFoundation __exceptionPreprocess + 350
libobjc.A.dylib objc_exception_throw + 48
CoreFoundation +[NSException raise:format:] + 188
Test 02 -[B4IFile GetAttributes::] + 388
Test 02 -[B4IFile IsDirectory::] + 98
CoreFoundation __invoking___ + 140
CoreFoundation -[NSInvocation invoke] + 321
Test 02 +[B4I runDynamicMethod:method:throwErrorIfMissing:args:] + 1650
Test 02 -[B4IShell runMethod:] + 380
Test 02 -[B4IShell raiseEventImpl:method:args::] + 1566
Test 02 -[B4IShellBI raiseEvent:event
arams:] + 1358
Test 02 +[B4IDebug delegate:::] + 66
Test 02 -[b4i_ts_app _initialize::] + 390
Test 02 -[b4i_b4xmainpage _b4xpage_created::] + 743
CoreFoundation __invoking___ + 140
CoreFoundation -[NSInvocation invoke] + 321
Test 02 +[B4I runDynamicMethod:method:throwErrorIfMissing:args:] + 1650
Test 02 -[B4ICommon CallSubDebug4::::] + 1061
Test 02 -[B4ICommon CallSubDebug2::::] + 326
Test 02 -[b4i_b4xpagesmanager _createpageifneeded::] + 1183
Test 02 -[b4i_b4xpagesmanager _showpage::] + 780
Test 02 -[b4i_b4xpagesmanager _addpage:::] + 1464
Test 02 -[b4i_b4xpagesmanager _addpageandcreate:::] + 599
Test 02 -[b4i_b4xpagesmanager _initialize:::] + 1918
Test 02 -[b4i_main _application_start:] + 634
CoreFoundation __invoking___ + 140
CoreFoundation -[NSInvocation invoke] + 321
Test 02 +[B4I runDynamicMethod:method:throwErrorIfMissing:args:] + 1650
Test 02 -[B4IShell runMethod:] + 380
Test 02 -[B4IShell raiseEventImpl:method:args::] + 2076
Test 02 -[B4IShellBI raiseEvent:event
arams:] + 1358
Test 02 __33-[B4I raiseUIEvent:event
arams:]_block_invoke + 51
libdispatch.dylib _dispatch_call_block_and_release + 12
libdispatch.dylib _dispatch_client_callout + 8
libdispatch.dylib _dispatch_main_queue_callback_4CF + 1042
CoreFoundation __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9
CoreFoundation __CFRunLoopRun + 2041
CoreFoundation CFRunLoopRunSpecific + 404
GraphicsServices GSEventRunModal + 139
UIKitCore UIApplicationMain + 1605
Test 02 main + 112
libdyld.dylib start + 1
??? 0x0 + 1
)