 |
Changeset 3548
- Timestamp:
- 06/03/08 17:04:48
(6 months ago)
- Author:
- lmartin92
- Message:
Now updated to include methods that may or may not make it into the interface; however, they should be usefull anyway. However, one method does only returns what is said by another because it isn't supported by FTP but may in the future be supported by the interface.
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r3498 |
r3548 |
|
| 1084 | 1084 | return new FtpFile(toString_, name_, username_, password_, port_); |
|---|
| 1085 | 1085 | } |
|---|
| | 1086 | |
|---|
| | 1087 | /*********************************************************************** |
|---|
| | 1088 | Time modified |
|---|
| | 1089 | ***********************************************************************/ |
|---|
| | 1090 | |
|---|
| | 1091 | Time mtime() { |
|---|
| | 1092 | conn.close(); |
|---|
| | 1093 | |
|---|
| | 1094 | conOpen = false; |
|---|
| | 1095 | |
|---|
| | 1096 | scope(failure) { |
|---|
| | 1097 | if(!conOpen) |
|---|
| | 1098 | if(conn !is null) |
|---|
| | 1099 | conn.close(); |
|---|
| | 1100 | } |
|---|
| | 1101 | |
|---|
| | 1102 | scope(exit) { |
|---|
| | 1103 | if(!conOpen) |
|---|
| | 1104 | if(conn !is null) |
|---|
| | 1105 | conn.close(); |
|---|
| | 1106 | } |
|---|
| | 1107 | |
|---|
| | 1108 | char[] connect = toString_; |
|---|
| | 1109 | |
|---|
| | 1110 | if(connect[$ - 1] == '/') { |
|---|
| | 1111 | connect = connect[0 .. ($ - 1)]; |
|---|
| | 1112 | } |
|---|
| | 1113 | |
|---|
| | 1114 | if(!conOpen) { |
|---|
| | 1115 | conn = new FTPConnection(connect, username_, password_, port_); |
|---|
| | 1116 | } |
|---|
| | 1117 | |
|---|
| | 1118 | return conn.getFileInfo(name_).modify; |
|---|
| | 1119 | } |
|---|
| | 1120 | |
|---|
| | 1121 | /*********************************************************************** |
|---|
| | 1122 | Time created |
|---|
| | 1123 | ***********************************************************************/ |
|---|
| | 1124 | |
|---|
| | 1125 | Time ctime() { |
|---|
| | 1126 | conn.close(); |
|---|
| | 1127 | |
|---|
| | 1128 | conOpen = false; |
|---|
| | 1129 | |
|---|
| | 1130 | scope(failure) { |
|---|
| | 1131 | if(!conOpen) |
|---|
| | 1132 | if(conn !is null) |
|---|
| | 1133 | conn.close(); |
|---|
| | 1134 | } |
|---|
| | 1135 | |
|---|
| | 1136 | scope(exit) { |
|---|
| | 1137 | if(!conOpen) |
|---|
| | 1138 | if(conn !is null) |
|---|
| | 1139 | conn.close(); |
|---|
| | 1140 | } |
|---|
| | 1141 | |
|---|
| | 1142 | char[] connect = toString_; |
|---|
| | 1143 | |
|---|
| | 1144 | if(connect[$ - 1] == '/') { |
|---|
| | 1145 | connect = connect[0 .. ($ - 1)]; |
|---|
| | 1146 | } |
|---|
| | 1147 | |
|---|
| | 1148 | if(!conOpen) { |
|---|
| | 1149 | conn = new FTPConnection(connect, username_, password_, port_); |
|---|
| | 1150 | } |
|---|
| | 1151 | |
|---|
| | 1152 | return conn.getFileInfo(name_).create; |
|---|
| | 1153 | } |
|---|
| | 1154 | |
|---|
| | 1155 | Time atime() { |
|---|
| | 1156 | conn.close(); |
|---|
| | 1157 | |
|---|
| | 1158 | conOpen = false; |
|---|
| | 1159 | |
|---|
| | 1160 | scope(failure) { |
|---|
| | 1161 | if(!conOpen) |
|---|
| | 1162 | if(conn !is null) |
|---|
| | 1163 | conn.close(); |
|---|
| | 1164 | } |
|---|
| | 1165 | |
|---|
| | 1166 | scope(exit) { |
|---|
| | 1167 | if(!conOpen) |
|---|
| | 1168 | if(conn !is null) |
|---|
| | 1169 | conn.close(); |
|---|
| | 1170 | } |
|---|
| | 1171 | |
|---|
| | 1172 | char[] connect = toString_; |
|---|
| | 1173 | |
|---|
| | 1174 | if(connect[$ - 1] == '/') { |
|---|
| | 1175 | connect = connect[0 .. ($ - 1)]; |
|---|
| | 1176 | } |
|---|
| | 1177 | |
|---|
| | 1178 | if(!conOpen) { |
|---|
| | 1179 | conn = new FTPConnection(connect, username_, password_, port_); |
|---|
| | 1180 | } |
|---|
| | 1181 | |
|---|
| | 1182 | return conn.getFileInfo(name_).modify; |
|---|
| | 1183 | } |
|---|
| 1086 | 1184 | } |
|---|
| 1087 | 1185 | |
|---|
Download in other formats:
|
 |
 |
|
 |
Copyright © 2006-2008 Tango. All Rights Reserved. | Page Width:
Static or
Dynamic