AlgoDataDirectory

Undocumented

  • Create directory on server

    • error: An error object that indicates why the request failed, or nil if the request was successful.

    Declaration

    Swift

    public func create(_ completion:@escaping AlgoSimpleCompletionHandler)

    Parameters

    completion

    completion handler. It takes one parameter

  • Create directory on server with read access control list

    • error: An error object that indicates why the request failed, or nil if the request was successful.

    Declaration

    Swift

    public func create(readACL:DataACL? , completion:@escaping AlgoSimpleCompletionHandler)

    Parameters

    readACL

    read access control list for new directory.

    completion

    completion handler. It takes one parameter

  • Update directory access control list

    • error: An error object that indicates why the request failed, or nil if the request was successful.

    Declaration

    Swift

    public func update(readACL:DataACL , completion:@escaping AlgoSimpleCompletionHandler)

    Parameters

    readACL

    read access control list for current directory.

    completion

    completion handler. It takes one parameter

  • Delete directory on server

    • error: An error object that indicates why the request failed, or nil if the request was successful.

    Declaration

    Swift

    public func delete(force:Bool, completion:@escaping (DeletedResult?, Error?) -> Void )

    Parameters

    force

    boolean that indicates force deletion of directory even if it still has other files in it

    completion

    completion handler. It takes one parameter

  • Return file in directory

    Declaration

    Swift

    public func file(name:String) -> AlgoDataFile

    Parameters

    name

    filename

    Return Value

    File object in directory

  • return sub directory

    Declaration

    Swift

    public func dir(name:String) -> AlgoDataDirectory

    Parameters

    name

    name of directory

    Return Value

    Directory object

  • Upload local file in directory

    • error: An error object that indicates why the request failed, or nil if the request was successful.

    Declaration

    Swift

    public func put(file:URL, completion:@escaping (AlgoDataFile?, Error?) -> Void)

    Parameters

    file

    URL of local file

    completion

    completion handler. It takes one parameter

  • Iterate over data files/directory in directory.

    • dataObject: An object in directory. It can be data file or directory.
    • error: An error object that indicates why the request failed, or nil if the request was successful.

    Declaration

    Swift

    public func forEach(_ object:@escaping AlgoDataListingHandler, completion:@escaping AlgoSimpleCompletionHandler) -> AlgoDataListing

    Parameters

    object

    handler takes one param

    completion

    completion handler. It will be invoked when iteration completes or fails. It takes one parameter

    Return Value

    Data listing reference

  • Iterate over data directory in current directory.

    • dataObject: An directory object in directory.
    • error: An error object that indicates why the request failed, or nil if the request was successful.

    Declaration

    Swift

    public func forEach(dir:@escaping (AlgoDataDirectory?) -> Void, completion:@escaping AlgoSimpleCompletionHandler) -> AlgoDataListing

    Parameters

    object

    handler takes one param

    completion

    completion handler. It will be invoked when iteration completes or fails. It takes one parameter

    Return Value

    Data listing reference

  • Iterate over data files in directory.

    • dataObject: An object in directory. It can be data file or directory.
    • error: An error object that indicates why the request failed, or nil if the request was successful.

    Declaration

    Swift

    public func forEach(file:@escaping (AlgoDataFile?) -> Void, completion:@escaping AlgoSimpleCompletionHandler) -> AlgoDataListing

    Parameters

    object

    handler take one param

    completion

    completion handler. It will be invoked when iteration completes or fails. It takes one parameter

    Return Value

    Data listing reference