Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7500185
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T20:05:53+00:00 2026-05-29T20:05:53+00:00

I create an NSURLRequest and an NSURLConnection object and collect data in an NSMutableData

  • 0

I create an NSURLRequest and an NSURLConnection object and collect data in an NSMutableData instance. I then create an NSString from the downloaded data and get the directory listing of an ftp server that looks something like this:

drwx--x--x   13 username   username         4096 Feb  5 17:43 .
drwx--x--x   13 username   username         4096 Feb  5 17:43 ..
drwxr-x---   14 username   99               4096 Feb  1 16:55 public_html

I’m guessing there is some standard way of parsing this data, but I have had no luck on google.

So my question is, what is the best way of getting this data into some manageable object?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T20:05:55+00:00Added an answer on May 29, 2026 at 8:05 pm

    You could use NSScanner to chop up the string. That’s probably the easiest option.

    Alternatively, if those are tabs separating the values, you could split it up using the componentsSeparatedByString: method of NSString (which returns an array), and just do it in several nested loops. So first split it by @”\n”, then split each line by @”\t”, and so on.

    Or if the spacing of the values in each line is always consistent, you could grab each value using the substringWithRange: method of NSString.

    Or, if you’re comfortable with regular expressions, NSRegularExpression is another option.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hey I am using a NSURL Connection to receive data. [NSURLConnection sendSynchronousRequest: //create request
I can successfully retrieve data asynchronously through NSURLConnection from any other part in the
I'm using this very simple code from the Apple Guide: NSMutableData *receivedData; // Create
Here is the code I am using to create poll data from a json
Create a new appdomain, setup the assemblyResolve handler and you always get an exception
I am wanting to create a synchronous nsurlconnection request. Yes I know its stupid
I have a RubyMotion class that reads from Twitter's search API to create Tweet
I have multiple views which make the same NSURLRequest/NSURLConnection request . Ideally, in order
I am using following code NSURLRequest *theRequest=[NSURLRequest requestWithURL:[NSURL URLWithString:listUrl] cachePolicy:NSURLRequestUseProtocolCachePolicy timeoutInterval:180.0]; // create the
I'm using this code: NSString *recievedData; NSURLRequest *theRequest=[NSURLRequest requestWithURL:[NSURL URLWithString:@http://www.site.com/] cachePolicy:NSURLRequestUseProtocolCachePolicy timeoutInterval:60.0]; // create

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.