-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add cake process and filesystem structure
remove System.CommandLine fix cli quotation problems
- Loading branch information
1 parent
f6d8e16
commit 1583d66
Showing
36 changed files
with
3,217 additions
and
187 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
/*************************************************************************************** | ||
* Title: cake-build/cake | ||
* Author: Mattias Karlsson, Patrik Svensson, Gary Ewan Park, Dave Glick | ||
* Date: 01.05.2020 | ||
* Code version: commit: 0c46856abe976f6c122f05a5e82ccb854fd923c1 | ||
* Availability: https://github.com/cake-build/cake/blob/develop/src/Cake.Core/IO/IDirectory.cs | ||
* | ||
***************************************************************************************/ | ||
|
||
using System.Collections.Generic; | ||
using LocalStack.AwsLocal.ProcessCore.IO; | ||
|
||
namespace LocalStack.AwsLocal.Contracts | ||
{ | ||
/// Represents a directory. | ||
public interface IDirectory : IFileSystemInfo | ||
{ | ||
/// <summary> | ||
/// Gets the path to the directory. | ||
/// </summary> | ||
/// <value>The path.</value> | ||
new DirectoryPath? Path { get; } | ||
|
||
/// <summary> | ||
/// Creates the directory. | ||
/// </summary> | ||
void Create(); | ||
|
||
/// <summary> | ||
/// Moves the directory to the specified destination path. | ||
/// </summary> | ||
/// <param name="destination">The destination path.</param> | ||
void Move(DirectoryPath destination); | ||
|
||
/// <summary> | ||
/// Deletes the directory. | ||
/// </summary> | ||
/// <param name="recursive">Will perform a recursive delete if set to <c>true</c>.</param> | ||
void Delete(bool recursive); | ||
|
||
/// <summary> | ||
/// Gets directories matching the specified filter and scope. | ||
/// </summary> | ||
/// <param name="filter">The filter.</param> | ||
/// <param name="scope">The search scope.</param> | ||
/// <returns>Directories matching the filter and scope.</returns> | ||
IEnumerable<IDirectory> GetDirectories(string filter, SearchScope scope); | ||
|
||
/// <summary> | ||
/// Gets files matching the specified filter and scope. | ||
/// </summary> | ||
/// <param name="filter">The filter.</param> | ||
/// <param name="scope">The search scope.</param> | ||
/// <returns>Files matching the specified filter and scope.</returns> | ||
IEnumerable<IFile> GetFiles(string filter, SearchScope scope); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
/*************************************************************************************** | ||
* Title: cake-build/cake | ||
* Author: Mattias Karlsson, Patrik Svensson, Gary Ewan Park, Dmytro Dziuma | ||
* Date: 01.05.2020 | ||
* Code version: commit: 0c46856abe976f6c122f05a5e82ccb854fd923c1 | ||
* Availability: https://github.com/cake-build/cake/blob/develop/src/Cake.Core/IO/IFile.cs | ||
* | ||
***************************************************************************************/ | ||
|
||
using System.IO; | ||
using LocalStack.AwsLocal.ProcessCore.IO; | ||
|
||
namespace LocalStack.AwsLocal.Contracts | ||
{ | ||
/// <summary> | ||
/// Represents a file. | ||
/// </summary> | ||
public interface IFile : IFileSystemInfo | ||
{ | ||
/// <summary> | ||
/// Gets the path to the file. | ||
/// </summary> | ||
/// <value>The path.</value> | ||
new FilePath? Path { get; } | ||
|
||
/// <summary> | ||
/// Gets the length of the file. | ||
/// </summary> | ||
/// <value>The length of the file.</value> | ||
long Length { get; } | ||
|
||
/// <summary> | ||
/// Gets or sets the file attributes. | ||
/// </summary> | ||
/// <value>The file attributes.</value> | ||
FileAttributes Attributes { get; set; } | ||
|
||
/// <summary> | ||
/// Copies the file to the specified destination path. | ||
/// </summary> | ||
/// <param name="destination">The destination path.</param> | ||
/// <param name="overwrite">Will overwrite existing destination file if set to <c>true</c>.</param> | ||
void Copy(FilePath destination, bool overwrite); | ||
|
||
/// <summary> | ||
/// Moves the file to the specified destination path. | ||
/// </summary> | ||
/// <param name="destination">The destination path.</param> | ||
void Move(FilePath destination); | ||
|
||
/// <summary> | ||
/// Deletes the file. | ||
/// </summary> | ||
void Delete(); | ||
|
||
/// <summary> | ||
/// Opens the file using the specified options. | ||
/// </summary> | ||
/// <param name="fileMode">The file mode.</param> | ||
/// <param name="fileAccess">The file access.</param> | ||
/// <param name="fileShare">The file share.</param> | ||
/// <returns>A <see cref="Stream"/> to the file.</returns> | ||
Stream Open(FileMode fileMode, FileAccess fileAccess, FileShare fileShare); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
/*************************************************************************************** | ||
* Title: cake-build/cake | ||
* Author: Mattias Karlsson, Patrik Svensson, Gary Ewan Park | ||
* Date: 01.05.2020 | ||
* Code version: commit: 0c46856abe976f6c122f05a5e82ccb854fd923c1 | ||
* Availability: https://github.com/cake-build/cake/blob/develop/src/Cake.Core/IO/IFileSystem.cs | ||
* | ||
***************************************************************************************/ | ||
|
||
using LocalStack.AwsLocal.ProcessCore.IO; | ||
|
||
namespace LocalStack.AwsLocal.Contracts | ||
{ | ||
/// <summary> | ||
/// Represents a file system. | ||
/// </summary> | ||
public interface IFileSystem | ||
{ | ||
/// <summary> | ||
/// Gets a <see cref="IFile"/> instance representing the specified path. | ||
/// </summary> | ||
/// <param name="path">The path.</param> | ||
/// <returns>A <see cref="IFile"/> instance representing the specified path.</returns> | ||
IFile GetFile(FilePath path); | ||
|
||
/// <summary> | ||
/// Gets a <see cref="IDirectory"/> instance representing the specified path. | ||
/// </summary> | ||
/// <param name="path">The path.</param> | ||
/// <returns>A <see cref="IDirectory"/> instance representing the specified path.</returns> | ||
IDirectory GetDirectory(DirectoryPath path); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
/*************************************************************************************** | ||
* Title: cake-build/cake | ||
* Author: Mattias Karlsson, Gary Ewan Park | ||
* Date: 01.05.2020 | ||
* Code version: commit: 0c46856abe976f6c122f05a5e82ccb854fd923c1 | ||
* Availability: https://github.com/cake-build/cake/blob/develop/src/Cake.Core/IO/IFileSystemInfo.cs | ||
* | ||
***************************************************************************************/ | ||
|
||
using LocalStack.AwsLocal.ProcessCore.IO; | ||
|
||
namespace LocalStack.AwsLocal.Contracts | ||
{ | ||
/// <summary> | ||
/// Represents an entry in the file system | ||
/// </summary> | ||
public interface IFileSystemInfo | ||
{ | ||
/// <summary> | ||
/// Gets the path to the entry. | ||
/// </summary> | ||
/// <value>The path.</value> | ||
Path? Path { get; } | ||
|
||
/// <summary> | ||
/// Gets a value indicating whether this <see cref="IFileSystemInfo"/> exists. | ||
/// </summary> | ||
/// <value> | ||
/// <c>true</c> if the entry exists; otherwise, <c>false</c>. | ||
/// </value> | ||
bool Exists { get; } | ||
|
||
/// <summary> | ||
/// Gets a value indicating whether this <see cref="IFileSystemInfo"/> is hidden. | ||
/// </summary> | ||
/// <value> | ||
/// <c>true</c> if the entry is hidden; otherwise, <c>false</c>. | ||
/// </value> | ||
bool Hidden { get; } | ||
} | ||
} |
Oops, something went wrong.