0 people like it.

moduleLori.fsx

Lori's module

 1: 
 2: 
 3: 
 4: 
 5: 
 6: 
 7: 
 8: 
 9: 
10: 
11: 
12: 
13: 
14: 
15: 
16: 
17: 
18: 
19: 
20: 
21: 
22: 
23: 
24: 
25: 
26: 
27: 
28: 
29: 
30: 
31: 
32: 
33: 
34: 
35: 
36: 
37: 
38: 
39: 
40: 
41: 
42: 
43: 
44: 
45: 
46: 
47: 
48: 
module Lori

open System
open System.IO

type PersonRec = 
    {First: string;
     Last: string;
     Age: int}
    
let steve = { First = "Steve"; Last = "Holt"; Age = 17};;

val Bryan : PersonRec = { 


type qFileType =
    {strPathX: string;
     strExtX: string;
     strFileX: string;
     intSizeX: int32;
     datModified: DateTime;};;
     
//val Lori : PersonRec = {First = "Lori";
//                        Last = "Quievryn";
//                        Age = 39}

let rec2 = {strPathX = "Q:\\"; 
            strExtX = "xls"; 
            strFileX = "CAM";
            intSizeX = 50; 
            datModified = 01/02/2013;};;

let rec3 : qFileType = { "Q:\\"; 
                        "xls";
                        "CAM"; 
                        50; 
                        01/02/2013;};;

printf "This is a test


val rec1 : fileType = { strPath = "Q:

printf "Full File Path: %s\\%s.%s" rec1.strPath rec1.strFile rec1.strExt
//let PromptForInput strP = Console.WriteLine("Enter a file path to enumerate. ");
  
let FileReader strP = System.IO.Directory.EnumerateDirectories(strP)
  
module Lori
namespace System
namespace System.IO
type PersonRec =
  {First: string;
   Last: string;
   Age: int;}

Full name: Lori.PersonRec
PersonRec.First: string
Multiple items
val string : value:'T -> string

Full name: Microsoft.FSharp.Core.Operators.string

--------------------
type string = String

Full name: Microsoft.FSharp.Core.string
PersonRec.Last: string
PersonRec.Age: int
Multiple items
val int : value:'T -> int (requires member op_Explicit)

Full name: Microsoft.FSharp.Core.Operators.int

--------------------
type int = int32

Full name: Microsoft.FSharp.Core.int

--------------------
type int<'Measure> = int

Full name: Microsoft.FSharp.Core.int<_>
val steve : PersonRec

Full name: Lori.steve
Multiple items
val int32 : value:'T -> int32 (requires member op_Explicit)

Full name: Microsoft.FSharp.Core.Operators.int32

--------------------
type int32 = Int32

Full name: Microsoft.FSharp.Core.int32
Multiple items
type DateTime =
  struct
    new : ticks:int64 -> DateTime + 10 overloads
    member Add : value:TimeSpan -> DateTime
    member AddDays : value:float -> DateTime
    member AddHours : value:float -> DateTime
    member AddMilliseconds : value:float -> DateTime
    member AddMinutes : value:float -> DateTime
    member AddMonths : months:int -> DateTime
    member AddSeconds : value:float -> DateTime
    member AddTicks : value:int64 -> DateTime
    member AddYears : value:int -> DateTime
    ...
  end

Full name: System.DateTime

--------------------
DateTime()
   (+0 other overloads)
DateTime(ticks: int64) : unit
   (+0 other overloads)
DateTime(ticks: int64, kind: DateTimeKind) : unit
   (+0 other overloads)
DateTime(year: int, month: int, day: int) : unit
   (+0 other overloads)
DateTime(year: int, month: int, day: int, calendar: Globalization.Calendar) : unit
   (+0 other overloads)
DateTime(year: int, month: int, day: int, hour: int, minute: int, second: int) : unit
   (+0 other overloads)
DateTime(year: int, month: int, day: int, hour: int, minute: int, second: int, kind: DateTimeKind) : unit
   (+0 other overloads)
DateTime(year: int, month: int, day: int, hour: int, minute: int, second: int, calendar: Globalization.Calendar) : unit
   (+0 other overloads)
DateTime(year: int, month: int, day: int, hour: int, minute: int, second: int, millisecond: int) : unit
   (+0 other overloads)
DateTime(year: int, month: int, day: int, hour: int, minute: int, second: int, millisecond: int, kind: DateTimeKind) : unit
   (+0 other overloads)
val printf : format:Printf.TextWriterFormat<'T> -> 'T

Full name: Microsoft.FSharp.Core.ExtraTopLevelOperators.printf
type Directory =
  static member CreateDirectory : path:string -> DirectoryInfo + 1 overload
  static member Delete : path:string -> unit + 1 overload
  static member EnumerateDirectories : path:string -> IEnumerable<string> + 2 overloads
  static member EnumerateFileSystemEntries : path:string -> IEnumerable<string> + 2 overloads
  static member EnumerateFiles : path:string -> IEnumerable<string> + 2 overloads
  static member Exists : path:string -> bool
  static member GetAccessControl : path:string -> DirectorySecurity + 1 overload
  static member GetCreationTime : path:string -> DateTime
  static member GetCreationTimeUtc : path:string -> DateTime
  static member GetCurrentDirectory : unit -> string
  ...

Full name: System.IO.Directory
Directory.EnumerateDirectories(path: string) : Collections.Generic.IEnumerable<string>
Directory.EnumerateDirectories(path: string, searchPattern: string) : Collections.Generic.IEnumerable<string>
Directory.EnumerateDirectories(path: string, searchPattern: string, searchOption: SearchOption) : Collections.Generic.IEnumerable<string>
Raw view Test code New version

More information

Link:http://fssnip.net/kd
Posted:11 years ago
Author:llq
Tags: tryfsharp