Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change isDirectory to fileKind enumeration #666

Merged
merged 3 commits into from
Mar 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.