Skip to content

Commit

Permalink
fix listFilePathsIn
Browse files Browse the repository at this point in the history
  • Loading branch information
jeff-hykin committed Oct 30, 2022
1 parent 1c51ac6 commit e76a1d5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions main/file_system.js
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ export const FileSystem = {
// however "inside" and "outside" are difficult because folders can be symlinks.
// So find the absolute path to the target, check if that hard path is external or internal
// another edgecase is what if the folder contains a symlink with an absolute path of the folder being moved (or something inside of the folder being moved)
await moveAndRename(item, newPath)
await moveAndRename(oldPath, newPath)
},
async remove(fileOrFolder) {
fileOrFolder = fileOrFolder.path || fileOrFolder
Expand Down Expand Up @@ -869,7 +869,7 @@ export const FileSystem = {
// includes symlinks if they link to files and pipes
async listFileItemsIn(pathOrFileInfo, options={treatAllSymlinksAsFiles:false}) {
const { treatAllSymlinksAsFiles } = {treatAllSymlinksAsFiles:false, ...options}
const items = await FileSystem.listItemsIn(pathOrFileInfo)
const items = await FileSystem.listItemsIn(pathOrFileInfo, options)
if (treatAllSymlinksAsFiles) {
return items.filter(eachItem=>(eachItem.isFile || (treatAllSymlinksAsFiles && eachItem.isSymlink)))
} else {
Expand All @@ -884,7 +884,7 @@ export const FileSystem = {
},
async listFolderItemsIn(pathOrFileInfo, options={ignoreSymlinks:false}) {
const { ignoreSymlinks } = {ignoreSymlinks:false, ...options}
const items = await FileSystem.listItemsIn(pathOrFileInfo)
const items = await FileSystem.listItemsIn(pathOrFileInfo, options)
if (ignoreSymlinks) {
return items.filter(eachItem=>(eachItem.isFolder && !eachItem.isSymlink))
} else {
Expand Down
8 changes: 4 additions & 4 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ Simple API's, and a flat dependency structure. Currently in Beta.
## Examples

```js
import { FileSystem } from "https://deno.land/x/quickr@0.4.5/main/file_system.js"
import { run, throwIfFails, zipInto, mergeInto, returnAsString, Timeout, Env, Cwd, Stdin, Stdout, Stderr, Out, Overwrite, AppendTo } from "https://deno.land/x/quickr@0.4.5/main/run.js"
import { Console, clearStylesFrom, black, white, red, green, blue, yellow, cyan, magenta, lightBlack, lightWhite, lightRed, lightGreen, lightBlue, lightYellow, lightMagenta, lightCyan, blackBackground, whiteBackground, redBackground, greenBackground, blueBackground, yellowBackground, magentaBackground, cyanBackground, lightBlackBackground, lightRedBackground, lightGreenBackground, lightYellowBackground, lightBlueBackground, lightMagentaBackground, lightCyanBackground, lightWhiteBackground, bold, reset, dim, italic, underline, inverse, hidden, strikethrough, visible, gray, grey, lightGray, lightGrey, grayBackground, greyBackground, lightGrayBackground, lightGreyBackground, } from "https://deno.land/x/quickr@0.4.5/main/console.js"
import { FileSystem } from "https://deno.land/x/quickr@0.4.6/main/file_system.js"
import { run, throwIfFails, zipInto, mergeInto, returnAsString, Timeout, Env, Cwd, Stdin, Stdout, Stderr, Out, Overwrite, AppendTo } from "https://deno.land/x/quickr@0.4.6/main/run.js"
import { Console, clearStylesFrom, black, white, red, green, blue, yellow, cyan, magenta, lightBlack, lightWhite, lightRed, lightGreen, lightBlue, lightYellow, lightMagenta, lightCyan, blackBackground, whiteBackground, redBackground, greenBackground, blueBackground, yellowBackground, magentaBackground, cyanBackground, lightBlackBackground, lightRedBackground, lightGreenBackground, lightYellowBackground, lightBlueBackground, lightMagentaBackground, lightCyanBackground, lightWhiteBackground, bold, reset, dim, italic, underline, inverse, hidden, strikethrough, visible, gray, grey, lightGray, lightGrey, grayBackground, greyBackground, lightGrayBackground, lightGreyBackground, } from "https://deno.land/x/quickr@0.4.6/main/console.js"
```

### Run.js

```js
import { run, hasCommand, throwIfFails, zipInto, mergeInto, returnAsString, Timeout, Env, Cwd, Stdin, Stdout, Stderr, Out, Overwrite, AppendTo } from "https://deno.land/x/quickr@0.4.5/main/run.js"
import { run, hasCommand, throwIfFails, zipInto, mergeInto, returnAsString, Timeout, Env, Cwd, Stdin, Stdout, Stderr, Out, Overwrite, AppendTo } from "https://deno.land/x/quickr@0.4.6/main/run.js"

// runs async
run("echo", "hello")
Expand Down

0 comments on commit e76a1d5

Please sign in to comment.