Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(32)

Side by Side Diff: net/ftp/ftp_util.h

Issue 465059: Implement parser for Netware-style FTP LIST response listing. (Closed)
Patch Set: Created 11 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef NET_FTP_FTP_UTIL_H_ 5 #ifndef NET_FTP_FTP_UTIL_H_
6 #define NET_FTP_FTP_UTIL_H_ 6 #define NET_FTP_FTP_UTIL_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/string16.h" 10 #include "base/string16.h"
11 11
12 namespace base {
13 class Time;
14 }
15
12 namespace net { 16 namespace net {
13 17
14 class FtpUtil { 18 class FtpUtil {
15 public: 19 public:
16 // Convert Unix file path to VMS path (must be a file, and not a directory). 20 // Convert Unix file path to VMS path (must be a file, and not a directory).
17 static std::string UnixFilePathToVMS(const std::string& unix_path); 21 static std::string UnixFilePathToVMS(const std::string& unix_path);
18 22
19 // Convert Unix directory path to VMS path (must be a directory). 23 // Convert Unix directory path to VMS path (must be a directory).
20 static std::string UnixDirectoryPathToVMS(const std::string& unix_path); 24 static std::string UnixDirectoryPathToVMS(const std::string& unix_path);
21 25
22 // Convert VMS path to Unix-style path. 26 // Convert VMS path to Unix-style path.
23 static std::string VMSPathToUnix(const std::string& vms_path); 27 static std::string VMSPathToUnix(const std::string& vms_path);
24 28
25 // Convert three-letter month abbreviation (like Nov) to its number (in range 29 // Convert three-letter month abbreviation (like Nov) to its number (in range
26 // 1-12). 30 // 1-12).
27 static bool ThreeLetterMonthToNumber(const string16& text, int* number); 31 static bool ThreeLetterMonthToNumber(const string16& text, int* number);
32
33 // Convert a "ls -l" date listing to time. The listing comes in three columns.
34 // The first one contains month, the second one contains day of month.
35 // The first one is either a time (and then the current year is assumed),
36 // or is a year (and then we don't know the time).
37 static bool LsDateListingToTime(const string16& month,
38 const string16& day,
39 const string16& rest,
40 base::Time* time);
28 }; 41 };
29 42
30 } // namespace net 43 } // namespace net
31 44
32 #endif // NET_FTP_FTP_UTIL_H_ 45 #endif // NET_FTP_FTP_UTIL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698