Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- type Result<'TSuccess, 'TFailure> =
- | Success of 'TSuccess
- | Failure of 'TFailure
- let private getFiles path =
- try
- Success <| Directory.GetFiles path
- with exn ->
- Failure exn.Message
- let unravel list =
- let rec loop ls xs ys =
- match ls with
- | [] ->
- ( xs, ys )
- | ( Success x ) :: tl ->
- loop tl ( x :: xs ) ys
- | ( Failure y ) :: tl ->
- loop tl xs ( y :: ys )
- in
- loop list [] []
- let getTitleList () =
- [ @"\\10.84.12.209\mcvod\sdi_ipvod\"
- ; @"\\10.84.12.209\mcvod\hdi_ipvod\"
- ; @"x:\encoded2\"
- ; @"x:\encoded2\mcvod\archive\"
- ; @"y:\mcvod_mezzanine\sdi_ipvod\archive\"
- ; @"y:\mcvod_mezzanine\sdi_ipvod\archive\april_2012\"
- ; @"y:\mcvod_mezzanine\sdi_ipvod\archive\may_2012\"
- ; @"y:\mcvod_mezzanine\sdi_ipvod\bad\logged\"
- ; @"y:\mcvod_mezzanine\hdi_ipvod\archive\"
- ; @"y:\mcvod_mezzanine\hdi_ipvod\archive\failed_qa\"
- ; @"y:\mcvod_mezzanine\hdi_ipvod\baton\"
- ; @"y:\mcvod_mezzanine\hdi_ipvod\hold\"
- ; @"y:\mcvod_mezzanine\hdi_ipvod\transcode_needed\hdp_surround\"
- ]
- |> List.map getFiles
- |> unravel
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement