Skip to content

Tools to check file size, file/directory existence #36

@demyan

Description

@demyan

I would be great to have a tool to check:

  • file size
  • file exist
  • directory exist

KDB has hcount and key:
https://code.kx.com/q/ref/hcount/
https://code.kx.com/q/ref/key/#whether-a-file-exists

q)hcount `:exist
0
q)hcount `:nonexist
'nonexist. OS reports: No such file or directory
  [0]  hcount `:nonexist
       ^
q)hcount `:existDir
'existDir. OS reports: Is a directory
  [0]  hcount `:existDir
       ^
q)key `:exist
`:exist
q)key `:existDir
,`1
q)key `:existEmptyDir
`symbol$()
q)key `:nonexist
q)type key `:nonexist
0h

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions