File tree Expand file tree Collapse file tree 3 files changed +16
-2
lines changed
Expand file tree Collapse file tree 3 files changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ Add `markedit-api` to your (TypeScript) project's devDependencies:
1919``` json
2020{
2121 "devDependencies" : {
22- "markedit-api" : " https://github.com/MarkEdit-app/MarkEdit-api#v0.17 .0"
22+ "markedit-api" : " https://github.com/MarkEdit-app/MarkEdit-api#v0.18 .0"
2323 }
2424}
2525```
@@ -62,6 +62,8 @@ interface MarkEdit {
6262 getFileContent(path ? : string ): Promise <string | undefined >;
6363 // Get the information of a file.
6464 getFileInfo(path ? : string ): Promise <FileInfo | undefined >;
65+ // Get the path of a standard directory.
66+ getDirectoryPath(type : DirectoryType ): string ;
6567 // Get all items from the native pasteboard.
6668 getPasteboardItems(): Promise <PasteboardItem []>;
6769 // Get the string from the native pasteboard.
Original file line number Diff line number Diff line change @@ -166,6 +166,13 @@ export interface MarkEdit {
166166 */
167167 getFileInfo ( path ?: string ) : Promise < FileInfo | undefined > ;
168168
169+ /**
170+ * Get the path of a standard directory.
171+ * @param type The directory type.
172+ * @returns The directory path.
173+ */
174+ getDirectoryPath ( type : DirectoryType ) : string ;
175+
169176 /**
170177 * Get all items from the native pasteboard.
171178 * @returns The items from the native (general) pasteboard.
@@ -568,6 +575,11 @@ export type CreateFileOptions = {
568575 data ?: string ;
569576} ;
570577
578+ /**
579+ * Represents standard directory types.
580+ */
581+ export type DirectoryType = 'home' | 'documents' | 'library' | 'caches' | 'temporary' ;
582+
571583/**
572584 * Represents options to show the save panel.
573585 */
Original file line number Diff line number Diff line change 11{
22 "name" : " markedit-api" ,
3- "version" : " 0.17 .0" ,
3+ "version" : " 0.18 .0" ,
44 "description" : " Type definitions for the latest MakrEdit API." ,
55 "main" : " ./index.cjs" ,
66 "module" : " ./index.js" ,
You can’t perform that action at this time.
0 commit comments