lib/Fs/Ft.ps1
using namespace Microsoft.VisualBasic.FileIO using namespace System.IO function Ft-Str ($ft){ [File]::ReadAllText($(Full-Ffn $ft))} function Ft-Ly ($ft){[File]::ReadAllLines($(Full-Ffn $ft))} function Opn-Read{[OutputType([StreamReader])]param($ft) [FileSystem]::OpenTextFileReader($(Full-Ffn $ft)) } function Opn-Wrt {[OutputType([StreamWriter])]param($ft) [FileSystem]::OpenTextFileWriter($(Full-Ffn $ft),$false) } function Opn-App {[OutputType([StreamWriter])]param($ft) [FileSystem]::OpenTextFileWriter($(Full-Ffn $ft),$true) } function Brw-Ft ($ft){notepad.exe "$(Full-Ffn $ft)" } function Srt-Ft ($ft){Ft-Ly $ft | sort } # }| Wrt-Obj $ft } |