Skip to content

Commit

Permalink
Change isDirectory to fileKind enumeration (#666)
Browse files Browse the repository at this point in the history
* Change isDirectory to fileKind enumeration

Fixes #630

Note that fileKind was choosen since fileType is already in use

Signed-off-by: Gary O'Neall <gary@sourceauditor.com>

* Fix type for fileKind

Signed-off-by: Gary O'Neall <gary@sourceauditor.com>

* Update per comments

Signed-off-by: Gary O'Neall <gary@sourceauditor.com>

---------

Signed-off-by: Gary O'Neall <gary@sourceauditor.com>
  • Loading branch information
goneall authored Mar 22, 2024
1 parent a8f78dd commit 8cc3cfc
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 21 deletions.
6 changes: 3 additions & 3 deletions model/Software/Classes/File.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Refers to any object that stores content on a computer.
Refers to any object that stores content on a computer.
The type of content can optionally be provided in the contentType property.

If the isDirectory property is specified and set to true, then the file represents a directory and all content stored in that directory.
The fileKind property can be set to `directory` to indicate the file represents a directory and all content stored in that directory.

## Metadata

Expand All @@ -24,8 +24,8 @@ If the isDirectory property is specified and set to true, then the file represen
- type: /Core/MediaType
- minCount: 0
- maxCount: 1
- isDirectory
- type: xsd:boolean
- fileKind
- type: FileKindType
- minCount: 0
- maxCount: 1

Expand Down
18 changes: 18 additions & 0 deletions model/Software/Properties/fileKind.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
SPDX-License-Identifier: Community-Spec-1.0

# fileKind

## Summary

Describes if a given file is a directory or non-directory kind of file.

## Description

An SPDX file may represent a specific file or a directory of files. In the future, this may be extended to other kinds (e.g. network based files).

## Metadata

- name: fileKind
- Nature: ObjectProperty
- Range: FileKindType

18 changes: 0 additions & 18 deletions model/Software/Properties/isDirectory.md

This file was deleted.

20 changes: 20 additions & 0 deletions model/Software/Vocabularies/FileKindType.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
SPDX-License-Identifier: Community-Spec-1.0

# FileKindType

## Summary

Enumeration of the different kinds of SPDX file.

## Description

An SPDX file may represent a file on disk or a directory of files. In the future, this may be extended to other kinds (e.g. network based files).

## Metadata

- name: FileKindType

## Entries

- file: The file represents a single file (default).
- directory: The file represents a directory and all content stored in that directory.

0 comments on commit 8cc3cfc

Please sign in to comment.