functional-file v0.0.1
functional-file
Index
Modules
functional-file
Modules
Module: "File"
Index
Variables
- getBufferFrom
- getFileNameFromPath
- getFileNamesInFolder
- getFilePathsInFolder
- getFolderNameFromPath
- saveBufferTo
Functions
Variables
Const
getBufferFrom
• getBufferFrom: function = pipe(getBufferFromIO, IOEUtils.fromIO)
Defined in File.ts:43
Type declaration:
▸ (path
: string): IOEither‹Error, Buffer›
Parameters:
Name | Type |
---|---|
path | string |
Const
getFileNameFromPath
• getFileNameFromPath: function = pipe( split('/'), last )
Defined in File.ts:69
Type declaration:
▸ (path
: string): string
Parameters:
Name | Type |
---|---|
path | string |
Const
getFileNamesInFolder
• getFileNamesInFolder: function = pipe( getFilenamesInFolderIO, IOEUtils.fromIO )
Defined in File.ts:53
Type declaration:
▸ (folder
: string): IOEither‹Error, string[]›
Parameters:
Name | Type |
---|---|
folder | string |
Const
getFilePathsInFolder
• getFilePathsInFolder: function = converge(curryN(2, compose), pipe(concat, IOE.map), getFileNamesInFolder, )
Defined in File.ts:61
Type declaration:
▸ (folder
: string): IOEither‹Error, string[]›
Parameters:
Name | Type |
---|---|
folder | string |
Const
getFolderNameFromPath
• getFolderNameFromPath: function = pipe( split('/'), dropLast(1), join('/'), flip(concat)('/') )
Defined in File.ts:75
Type declaration:
▸ (path
: string): string
Parameters:
Name | Type |
---|---|
path | string |
Const
saveBufferTo
• saveBufferTo: function = pipe( saveBufferToIO, R.map(IOEUtils.fromIO) )
Defined in File.ts:30
Type declaration:
▸ (path
: string): Reader‹Buffer, IOEither‹Error, string››
Parameters:
Name | Type |
---|---|
path | string |
Functions
Const
getBufferFromIO
▸ getBufferFromIO(path
: string): (Anonymous function)
Defined in File.ts:38
Parameters:
Name | Type |
---|---|
path | string |
Returns: (Anonymous function)
Const
saveBufferToIO
▸ saveBufferToIO(path
: string): (Anonymous function)
Defined in File.ts:22
Parameters:
Name | Type |
---|---|
path | string |
Returns: (Anonymous function)
Module: "index"
Index
References
- getBufferFrom
- getBufferFromIO
- getFileNameFromPath
- getFileNamesInFolder
- getFilePathsInFolder
- getFolderNameFromPath
- saveBufferTo
- saveBufferToIO
References
getBufferFrom
• getBufferFrom:
getBufferFromIO
• getBufferFromIO:
getFileNameFromPath
• getFileNameFromPath:
getFileNamesInFolder
• getFileNamesInFolder:
getFilePathsInFolder
• getFilePathsInFolder:
getFolderNameFromPath
• getFolderNameFromPath:
saveBufferTo
• saveBufferTo:
saveBufferToIO
• saveBufferToIO:
Module: "IOUtils"
Index
Variables
Variables
Const
fromIO
• fromIO: function = partialRight(IOE.tryCatch, E.toError)
Defined in IOUtils.ts:7
Type declaration:
▸ <A>(io
: IO‹A›): IOEither‹Error, A›
Type parameters:
▪ A
Parameters:
Name | Type |
---|---|
io | IO‹A› |
4 years ago