Search code examples
iosios7uploadblackraccoon

BlackRaccoon Check if file exist


I'm using BlackRaccoon to upload a file within a server. Prior to upload I'd like to understand if it is possible to check if the file that I upload is present or not!. Is it possible? Thank you, Vincenzo


Solution

  • You could maybe use the List Directory Function

    listDir = [[BRRequestListDirectory alloc] initWithDelegate: self];  
    
    listDir.path = @"/home/user/newdirectory/";
    listDir.hostname = @"192.168.1.100";
    listDir.username = @"yourusername";
    listDir.password = @"yourpassword";
    
    [listDir start];
    

    then on the received list there is a

    - (BOOL)fileExists:(NSString *)fileNamePath;
    

    option.

    Pass this the fileName to check whether your file already exists in the Directory.