Skip to content

Commit df98393

Browse files
committedSep 24, 2014
Merge pull request #12 from brunneros/master
Added time() method - Returns the last modified time of the given file.
2 parents e901864 + fff323e commit df98393

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed
 

‎README.md

+7
Original file line numberDiff line numberDiff line change
@@ -143,3 +143,10 @@ Returns the size of the given file in bytes.
143143
`Note: Not all servers support this feature.`
144144

145145
- `$remoteFile`: The remote file.
146+
147+
**time($remoteFile)**
148+
149+
Returns the last modified time of the given file
150+
`Note: Not all servers support this feature.`
151+
152+
- `$remoteFile`: The remote file.

‎src/Anchu/Ftp/Ftp.php

+11
Original file line numberDiff line numberDiff line change
@@ -253,4 +253,15 @@ public function size($remoteFile)
253253
return ftp_size($this->connectionId, $remoteFile);
254254
}
255255

256+
/**
257+
* Returns the last modified time of the given file
258+
*
259+
* @param $remoteFile
260+
* @return int
261+
*/
262+
public function time($remoteFile)
263+
{
264+
return ftp_mdtm($this->connectionId, $remoteFile);
265+
}
266+
256267
}

0 commit comments

Comments
 (0)
Failed to load comments.