Beispiel #1
0
        private static List <FindResult> ExecuteFind(FindInput input)
        {
            var results    = FindMatchingFiles(input.Directory, input.Pattern);
            var foundFiles = results.Files.Select(match => Path.Combine(input.Directory, match.Path)).ToArray();

            return(foundFiles.Select(fullPath => new FindResult(new FileInfo(fullPath))).ToList());
        }
Beispiel #2
0
 /// <summary>
 /// Get file information for files. See: https://github.com/FrendsPlatform/Frends.File#Find
 /// </summary>
 /// <returns>List [ Object  { string Extension, string DirectoryName, string FullPath,
 /// string FileName, bool IsReadOnly, double SizeInMegaBytes, DateTime CreationTime,
 /// DateTime CreationTimeUtc, DateTime LastAccessTime, DateTime LastAccessTimeUtc, DateTime LastWriteTime, DateTime LastWriteTimeUtc} ]</returns>
 public static List <FindResult> Find([PropertyTab] FindInput input, [PropertyTab] FindOption options)
 {
     return(ExecuteAction(() => ExecuteFind(input), options.UseGivenUserCredentialsForRemoteConnections, options.UserName, options.Password));
 }