Differences
This shows you the differences between the selected revisions of the page.
library_remotefileinfo 2016-05-27 | library_remotefileinfo 2020-12-24 (current) | ||
Line 1: | Line 1: | ||
====== RemoteFileInfo Class ====== | ====== RemoteFileInfo Class ====== | ||
- | Represents data about remote file. | + | Represents data about a remote file. |
~~AD~~ | ~~AD~~ | ||
Line 19: | Line 19: | ||
| [[library_filepermissions|FilePermissions]] ==FilePermissions== | File permissions. Read-only. | | | [[library_filepermissions|FilePermissions]] ==FilePermissions== | File permissions. Read-only. | | ||
| char ==FileType== | File type. ''-'' for regular file, ''D'' for directory, ''L'' for symbolic link, etc. Read-only. See also ''IsDirectory''. | | | char ==FileType== | File type. ''-'' for regular file, ''D'' for directory, ''L'' for symbolic link, etc. Read-only. See also ''IsDirectory''. | | ||
- | | string ==FullName== | File path. Read-only. &beta_feature | | + | | string ==FullName== | File path. See also ''Name''. Read-only. | |
- | | string ==Group== | File group. | | + | | string ==Group== | File group. Read-only. | |
| bool ==IsDirectory== | Is file a directory? (i.e. ''FileType'' is ''D''). Read-only. | | | bool ==IsDirectory== | Is file a directory? (i.e. ''FileType'' is ''D''). Read-only. | | ||
- | | bool ==IsParentDirectory== | Is it a reference to a parent directory (''..'')? Read-only. &beta_feature | | + | | bool ==IsParentDirectory== | Is it a reference to a parent directory (''..'')? Read-only. | |
- | | bool ==IsThisDirectory== | Is it a reference to this directory (''.'')? Read-only. &beta_feature | | + | | bool ==IsThisDirectory== | Is it a reference to this directory (''.'')? Read-only. | |
| DateTime ==LastWriteTime== | Timestamp of the last file modification. Read-only. | | | DateTime ==LastWriteTime== | Timestamp of the last file modification. Read-only. | | ||
| long ==Length== | Size of the file in bytes. Read-only. | | | long ==Length== | Size of the file in bytes. Read-only. | | ||
- | | int ==Length32== | An alternative to ''Length''. Particularly useful for COM hosts, that do not support 64-bit integers, such as Visual Basic. Throws ''OverflowException'', when the file size cannot be expressed using 32-bit integer. | | + | | int ==Length32== | An alternative to ''Length''. Particularly useful for COM hosts, that do not support 64-bit integers, such as Visual Basic. Throws ''OverflowException'', when the file size cannot be expressed using 32-bit integer. Read-only. | |
- | | string ==Name== | File name (with ''[[library_session_listdirectory|Session.ListDirectory]]'') or file path (with ''[[library_session_getfileinfo|Session.GetFileInfo]]''). Read-only. //In the beta version, it returns a file name only in both cases. For the file path, use the ''FullName''.// &beta | | + | | string ==Name== | File name. See also ''FullName''. Read-only. | |
- | | string ==Owner== | File owner. | | + | | string ==Owner== | File owner. Read-only. | |
===== Methods ===== | ===== Methods ===== | ||
Line 35: | Line 35: | ||
===== Remarks ===== | ===== Remarks ===== | ||
- | Instance of the class can be created by the WinSCP assembly only. You can only get an instance of the class by calling ''[[library_session_listdirectory|Session.ListDirectory]]'' or ''[[library_session_getfileinfo|Session.GetFileInfo]]''. | + | This class can only be instantiated by the WinSCP assembly. To get an instance of the class, call ''[[library_session_listdirectory|Session.ListDirectory]]'' or ''[[library_session_getfileinfo|Session.GetFileInfo]]''. |
===== Examples ===== | ===== Examples ===== | ||
Line 42: | Line 42: | ||
==== Real-Life Examples ==== | ==== Real-Life Examples ==== | ||
- | * [[library_example_check_existence_timestamp|Checking file existence and timestamp]]; | + | * [[library_example_check_existence_timestamp|*]]; |
- | * [[library_example_listing_files_matching_wildcard|Listing files matching wildcard]]; | + | * [[library_example_listing_files_matching_wildcard|*]]; |
- | * [[library_example_recursive_search_text|Search recursively for text in remote directory / Grep files over SFTP/FTP protocol]]; | + | * [[library_example_recursive_search_text|*]]; |
- | * [[library_example_recursive_download_custom_error_handling|Recursively download directory tree with custom error handling]]; | + | * [[library_example_recursive_download_custom_error_handling|*]]; |
- | * [[library_example_find_duplicate_files|Find duplicate files in SFTP/FTP server]]; | + | * [[library_example_find_duplicate_files|*]]; |
- | * [[script_custom_listing_format_csv|Custom directory listing format (CSV)]]. | + | * [[script_custom_listing_format_csv|*]]. |