comparison src/ch/ethz/ssh2/SFTPv3DirectoryEntry.java @ 273:91a31873c42a ganymed

start conversion from trilead to ganymed
author Carl Byington <carl@five-ten-sg.com>
date Fri, 18 Jul 2014 11:21:46 -0700
parents
children d2b303406d63
comparison
equal deleted inserted replaced
272:ce2f4e397703 273:91a31873c42a
1 /*
2 * Copyright (c) 2006-2011 Christian Plattner. All rights reserved.
3 * Please refer to the LICENSE.txt for licensing details.
4 */
5 package ch.ethz.ssh2;
6
7 /**
8 * A <code>SFTPv3DirectoryEntry</code> as returned by {@link SFTPv3Client#ls(String)}.
9 *
10 * @author Christian Plattner
11 * @version 2.50, 03/15/10
12 */
13 public class SFTPv3DirectoryEntry implements SFTPDirectoryEntry {
14 /**
15 * A relative name within the directory, without any path components.
16 */
17 public String filename;
18
19 /**
20 * An expanded format for the file name, similar to what is returned by
21 * "ls -l" on Un*x systems.
22 * <p/>
23 * The format of this field is unspecified by the SFTP v3 protocol.
24 * It MUST be suitable for use in the output of a directory listing
25 * command (in fact, the recommended operation for a directory listing
26 * command is to simply display this data). However, clients SHOULD NOT
27 * attempt to parse the longname field for file attributes; they SHOULD
28 * use the attrs field instead.
29 * <p/>
30 * The recommended format for the longname field is as follows:<br>
31 * <code>-rwxr-xr-x 1 mjos staff 348911 Mar 25 14:29 t-filexfer</code>
32 */
33 public String longEntry;
34
35 /**
36 * The attributes of this entry.
37 */
38 public SFTPv3FileAttributes attributes;
39
40 @Override
41 public String getFilename() {
42 return filename;
43 }
44
45 @Override
46 public SFTPv3FileAttributes getAttributes() {
47 return attributes;
48 }
49
50 @Override
51 public String toString() {
52 final StringBuilder sb = new StringBuilder("SFTPv3DirectoryEntry{");
53 sb.append("filename='").append(filename).append('\'');
54 sb.append(", attributes=").append(attributes);
55 sb.append('}');
56 return sb.toString();
57 }
58 }